Docker container management issue with Watchtower #13869
Unanswered
embpdaniel
asked this question in
Pulumi Providers
Replies: 1 comment
-
Did you work anything out? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I created a Pulumi script that builds and pushes a custom image to Docker hub, and then runs that image on a container in a Digital Ocean droplet. I then run a Watchtower container to monitor updates to that image so when I push a new version of the image to Docker hub it auto-updates the container with the new version.
This part is working ok, however I noticed when I run
pulumi down
to destroy the resources of my stack, the operation fails because Pulumi tries to stop the container using an outdated ID. Since Watchtower stops and restarts the container on an update (which in turn assigns a new ID), Pulumi is not aware of this ID and attempts to use the old one.Is there any way to avoid this? For example, could Pulumi be configured to stop the container by its name instead of its ID since it is a more stable reference to the container?
Beta Was this translation helpful? Give feedback.
All reactions