mirror of
https://github.com/wofferl/proxmox-backup-arm64
synced 2025-12-06 00:13:41 +00:00
28 lines
1015 B
Docker
28 lines
1015 B
Docker
ARG baseimage=debian:bullseye-slim
|
|
FROM ${baseimage} as builder-stage
|
|
ARG buildoptions
|
|
# workaround for memory bug https://github.com/rust-lang/cargo/issues/10583
|
|
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
SHELL ["/bin/bash", "-c"]
|
|
RUN dpkg --add-architecture arm64
|
|
RUN apt update && apt-get install -y --no-install-recommends \
|
|
build-essential crossbuild-essential-arm64 curl ca-certificates sudo git lintian \
|
|
pkg-config libudev-dev:arm64 libssl-dev:arm64 libapt-pkg-dev:arm64 apt:amd64 \
|
|
libclang-dev libpam0g-dev:arm64 pkgconf:arm64 zlib1g-dev:arm64 \
|
|
qemu-user-binfmt
|
|
RUN grep -qi bookworm /etc/os-release && apt-get install -y pkg-config:arm64 || true
|
|
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -sSf | sh -s -- -y
|
|
RUN source ~/.cargo/env && rustup target add aarch64-unknown-linux-gnu
|
|
|
|
COPY . /build/
|
|
WORKDIR /build
|
|
|
|
RUN df -h
|
|
RUN source ~/.cargo/env && ./build.sh ${buildoptions}
|
|
|
|
FROM scratch
|
|
COPY --from=builder-stage /build/*.log /build/packages/* /
|