Release multi-platform docker containers

This commit is contained in:
Michael Eischer
2023-05-19 17:16:29 +02:00
parent 170e495334
commit 2293835242
2 changed files with 35 additions and 9 deletions

20
docker/Dockerfile.release Normal file
View File

@@ -0,0 +1,20 @@
FROM --platform=$BUILDPLATFORM alpine:latest as helper
ARG VERSION
ARG TARGETOS
ARG TARGETARCH
# add release binary for the appropriate platform
COPY restic_${VERSION}_${TARGETOS}_${TARGETARCH}.bz2 /
RUN apk add --update --no-cache bzip2
RUN set -e && \
bzcat restic_${VERSION}_${TARGETOS}_${TARGETARCH}.bz2 > restic && \
chmod +x restic
FROM alpine:latest
COPY --from=helper /restic /usr/bin
RUN apk add --update --no-cache ca-certificates fuse openssh-client tzdata jq
ENTRYPOINT ["/usr/bin/restic"]