Skip to content

Commit 6408518

Browse files
committed
fix: add tini to docker images to reap rclone processes left behind by restic
1 parent be09303 commit 6408518

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

Dockerfile.alpine

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
FROM alpine:latest
2-
RUN apk --no-cache add ca-certificates curl bash rclone openssh tzdata
2+
RUN apk --no-cache add tini ca-certificates curl bash rclone openssh tzdata
33
RUN mkdir -p /tmp
44
COPY backrest /backrest
55
RUN /backrest --install-deps-only
66
RUN mkdir -p /bin && mv /root/.local/share/backrest/* /bin
77

8-
ENTRYPOINT ["/backrest"]
9-
RUN /backrest --install-deps-only
8+
ENTRYPOINT ["/sbin/tini", "--"]
9+
CMD ["/backrest"]

Dockerfile.scratch

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
FROM golang:alpine as gobuild
1+
FROM alpine:latest AS alpine
2+
RUN apk add --no-cache ca-certificates tini-static
23
RUN mkdir /tmp-orig
34
COPY backrest /backrest
45
RUN /backrest --install-deps-only
56
RUN mkdir -p /bin && mv /root/.local/share/backrest/* /bin
67

78
FROM scratch
8-
COPY --from=gobuild /tmp-orig /tmp
9-
COPY --from=gobuild /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
10-
COPY --from=gobuild /bin /bin
9+
COPY --from=alpine /tmp-orig /tmp
10+
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
11+
COPY --from=alpine /bin /bin
12+
COPY --from=alpine /sbin/tini-static /tini
13+
COPY backrest /backrest
1114

12-
ENTRYPOINT ["/backrest"]
13-
COPY backrest /backrest
15+
ENTRYPOINT ["/tini", "--"]
16+
CMD ["/backrest"]

0 commit comments

Comments
 (0)