mirror of
https://github.com/wofferl/proxmox-backup-arm64
synced 2025-12-29 06:33:17 +00:00
add build args for docker build
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
FROM debian:bullseye-slim as builder-stage
|
ARG baseimage=debian:bullseye-slim
|
||||||
|
FROM ${baseimage} as builder-stage
|
||||||
|
ARG buildoptions
|
||||||
# workaround for memory bug https://github.com/rust-lang/cargo/issues/10583
|
# workaround for memory bug https://github.com/rust-lang/cargo/issues/10583
|
||||||
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
@@ -14,7 +16,7 @@ COPY . /build/
|
|||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-c"]
|
SHELL ["/bin/bash", "-c"]
|
||||||
RUN source ~/.cargo/env && ./build.sh
|
RUN source ~/.cargo/env && ./build.sh ${buildoptions}
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
COPY --from=builder-stage /build/packages/* /
|
COPY --from=builder-stage /build/*.log /build/packages/* /
|
||||||
|
|||||||
@@ -35,6 +35,12 @@ You can build arm64 .deb packages using the provided Dockerfile and docker build
|
|||||||
docker buildx build -o packages --platform linux/arm64 .
|
docker buildx build -o packages --platform linux/arm64 .
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can also set build arguments for base image and build.sh options:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker buildx build -o packages --build-arg buildoptions="client debug" --build-arg baseimage=ubuntu:jammy --platform linux/arm64 .
|
||||||
|
```
|
||||||
|
|
||||||
Once the docker build is completed, packages will be copied from the docker build image to a folder named `packages` in the root folder.
|
Once the docker build is completed, packages will be copied from the docker build image to a folder named `packages` in the root folder.
|
||||||
|
|
||||||
## Install all needed packages
|
## Install all needed packages
|
||||||
|
|||||||
Reference in New Issue
Block a user