-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add tini to docker images to reap rclone processes left behind b…
…y restic
- Loading branch information
1 parent
be09303
commit 6408518
Showing
2 changed files
with
12 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
FROM alpine:latest | ||
RUN apk --no-cache add ca-certificates curl bash rclone openssh tzdata | ||
RUN apk --no-cache add tini ca-certificates curl bash rclone openssh tzdata | ||
RUN mkdir -p /tmp | ||
COPY backrest /backrest | ||
RUN /backrest --install-deps-only | ||
RUN mkdir -p /bin && mv /root/.local/share/backrest/* /bin | ||
|
||
ENTRYPOINT ["/backrest"] | ||
RUN /backrest --install-deps-only | ||
ENTRYPOINT ["/sbin/tini", "--"] | ||
CMD ["/backrest"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
FROM golang:alpine as gobuild | ||
FROM alpine:latest AS alpine | ||
RUN apk add --no-cache ca-certificates tini-static | ||
RUN mkdir /tmp-orig | ||
COPY backrest /backrest | ||
RUN /backrest --install-deps-only | ||
RUN mkdir -p /bin && mv /root/.local/share/backrest/* /bin | ||
|
||
FROM scratch | ||
COPY --from=gobuild /tmp-orig /tmp | ||
COPY --from=gobuild /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
COPY --from=gobuild /bin /bin | ||
COPY --from=alpine /tmp-orig /tmp | ||
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
COPY --from=alpine /bin /bin | ||
COPY --from=alpine /sbin/tini-static /tini | ||
COPY backrest /backrest | ||
|
||
ENTRYPOINT ["/backrest"] | ||
COPY backrest /backrest | ||
ENTRYPOINT ["/tini", "--"] | ||
CMD ["/backrest"] |