rustic/Dockerfile
mueckinger a580952b55
build: build and publish docker image on release (#1297)
Hi! Finally I figured out how to automatically build docker images on
every new rustic release.
Closes  #1083
Completes tasks discussed in #969, #1008 and #1010.

Notes to the maintainers:
- This requires setting Workflow permissions to write access for the
GITHUB_TOKEN as described here:
https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#configuring-the-default-github_token-permissions
- It makes sense to update the README (added docker install info) in the
next rustic release (when the first image is built)
2024-10-05 14:27:24 +00:00

13 lines
453 B
Docker

FROM alpine AS builder
ARG RUSTIC_VERSION
RUN wget https://github.com/rustic-rs/rustic/releases/download/${RUSTIC_VERSION}/rustic-${RUSTIC_VERSION}-x86_64-unknown-linux-musl.tar.gz && \
tar -xzf rustic-${RUSTIC_VERSION}-x86_64-unknown-linux-musl.tar.gz && \
mkdir /etc_files && \
touch /etc_files/passwd && \
touch /etc_files/group
FROM scratch
COPY --from=builder /rustic /
COPY --from=builder /etc_files/ /etc/
ENTRYPOINT ["/rustic"]