FROM golang:1.24-alpine AS builder WORKDIR /src COPY . . RUN go build -o /docker-entrypoint -ldflags "-s -w" ./cmd/docker-entrypoint FROM alpine:latest LABEL org.opencontainers.image.source="https://github.com/garethgeorge/backrest" RUN apk --no-cache add tini ca-certificates curl bash rclone openssh tzdata docker-cli RUN mkdir -p /tmp COPY backrest /backrest RUN /backrest --install-deps-only RUN mkdir -p /bin && mv /root/.local/share/backrest/restic /bin/restic COPY --from=builder /docker-entrypoint /docker-entrypoint ENTRYPOINT ["/sbin/tini", "--", "/docker-entrypoint"] CMD ["/backrest"]