Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility issue with docker compose abort-on-container-exit flag #1480

Closed
nothub opened this issue Nov 20, 2022 · 1 comment · Fixed by #1481
Closed

Compatibility issue with docker compose abort-on-container-exit flag #1480

nothub opened this issue Nov 20, 2022 · 1 comment · Fixed by #1481

Comments

@nothub
Copy link
Contributor

nothub commented Nov 20, 2022

Describe the bug

Watchtower causes an issue for me in combination with the --abort-on-container-exit flag for dockers compose up subcommand.

Docker compose removed the container on its own after the container was stopped. This leads to an error when watchtower attempts to remove the container.

Error: No such container: 425173...

The error is thrown by this ContainerRemove call.

Steps to reproduce

  1. Run container with docker compose up --abort-on-container-exit
  2. Update image with watchtower

Expected behavior

I expect for watchtower to be able to skip the container removal, either automatically if the container is already gone or with an explicit option.

Screenshots

No response

Environment

  • Debian 11 amd64
  • Docker 20.10.21

Your logs

...
Nov 20 23:09:37 docker[17234]: watchtower  | time="2022-11-20T23:09:37+01:00" level=debug msg="Found a match"
Nov 20 23:09:37 docker[17234]: watchtower  | time="2022-11-20T23:09:37+01:00" level=debug msg="No pull needed. Skipping image."
Nov 20 23:09:37 docker[17234]: watchtower  | time="2022-11-20T23:09:37+01:00" level=debug msg="No new images found for /traefik"
Nov 20 23:09:37 docker[17234]: watchtower  | time="2022-11-20T23:09:37+01:00" level=debug msg="This is the watchtower container /watchtower"
Nov 20 23:09:37 docker[17234]: watchtower  | time="2022-11-20T23:09:37+01:00" level=info msg="Stopping /website (425173d9c76c) with SIGTERM"
Nov 20 23:09:38 docker[17234]: watchtower  | time="2022-11-20T23:09:38+01:00" level=debug msg="Removing container 425173d9c76c"
Nov 20 23:09:38 docker[17234]: watchtower  | time="2022-11-20T23:09:38+01:00" level=error msg="Error: No such container: 425173d9c76c6f794674ac37f4999ce0817967ec6819c2ba21c61572bed4f383"
Nov 20 23:09:38 docker[17234]: watchtower  | time="2022-11-20T23:09:38+01:00" level=info msg="Session done" Failed=1 Scanned=5 Updated=0 notify=no
@github-actions
Copy link

Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏

piksel pushed a commit that referenced this issue Dec 6, 2022
Co-authored-by: nils måsén <nils@piksel.se>
Fixes #1480
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant