Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ COPY . .
RUN go build

FROM restic/restic:0.17.3
RUN apk add --no-cache rclone bash curl docker-cli
RUN apk add --no-cache rclone bash curl docker-cli tini
COPY --from=builder /app/autorestic /usr/bin/autorestic
ENTRYPOINT []
ENTRYPOINT [ "/sbin/tini", "--" ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an old changelog entry about handing signals and graceful shutdown - if I understand tini correctly, it'll kill the process on SIGTERM instead of letting it handle its own shutdown

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

”All Tini does is spawn a single child (Tini is meant to be run in a container), and wait for it to exit all the while reaping zombies and performing signal forwarding.“

ref https://github.com/krallin/tini

tinit avoids zombies.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an old changelog entry about handing signals and graceful shutdown - if I understand tini correctly, it'll kill the process on SIGTERM instead of letting it handle its own shutdown

https://github.com/restic/restic/blob/master/internal/backend/rclone/backend.go#L85

cmd.Start no wait caused zombies. this pr is a workaroumd. It works in my homelab

CMD [ "autorestic" ]