mirror of
https://gitlab.com/alemaire/buildx.git
synced 2025-01-11 02:53:30 +00:00
20 lines
739 B
Docker
20 lines
739 B
Docker
|
FROM debian:buster-20210111-slim as builder
|
||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||
|
ARG TARGETARCH
|
||
|
RUN apt update -qq && apt upgrade -qqy && rm -rf /var/lib/apt/lists/*
|
||
|
ARG VERSION
|
||
|
RUN case $TARGETARCH in \
|
||
|
arm) \
|
||
|
wget https://dl.bintray.com/borg-binary-builder/borg-binaries/borg-${VERSION}-armv6 -O /usr/bin/borg \
|
||
|
;; \
|
||
|
arm64) \
|
||
|
wget https://dl.bintray.com/borg-binary-builder/borg-binaries/borg-${VERSION}-arm64 -O /usr/bin/borg \
|
||
|
;; \
|
||
|
amd64) \
|
||
|
wget https://github.com/borgbackup/borg/releases/download/${VERSION}/borg-linux64 -O /usr/bin/borg \
|
||
|
;; \
|
||
|
esac && \
|
||
|
chmod a+x /usr/bin/borg
|
||
|
FROM debian:buster-20210111-slim
|
||
|
COPY --from=builder /usr/bin/borg /usr/bin/borg
|