Connect to Docker Network on Self-Update #1301
-
|
Hey. Is there a way to ensure watchtower connects back to a custom docker network when it self-updates? I use a specific docker network, which it whitelisted and allowed to "talk" to my DNS Server. When watchtower self-updates, it doesn't connect to this docker network, so is never assigned an IP/Port and ends up getting stuck or failing to correctly start. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
Watchtower, by design, persists network configurations across container updates. The use of various networking configurations is supported. I also personally use user-defined networks in my Watchtower deployments and have yet to observe the behavior/issue that you described. What you described sounds like an edge-case issue that cannot be resolved without additional diagnostic information (i.e. debug logs, container configuration info, system info, etc). I would encourage you to consider submitting a bug report here. |
Beta Was this translation helpful? Give feedback.
-
|
Great, thanks for coming back to me. Is there any way to preserve the logs when an update is attempted? I've had debugging on previously, but each time I've had an issue with updating, the logs are perged. |
Beta Was this translation helpful? Give feedback.
-
|
The release of version 1.14.2 is expected to resolve the issue that you were seeing, which was likely rooted in the proper sorting and handling of dependent containers. |
Beta Was this translation helpful? Give feedback.
Yes, Docker provides several methods for handling/persisting logs: https://docs.docker.com/engine/logging/
https://docs.docker.com/engine/logging/configure/#supported-logging-drivers
Using the journald logging driver will probably be the easiest for just enabling access locally to persisted debug logging from Watchtower:
https://docs.docker.com/engine/logging/drivers/journald/
If you're using a Compose file, then you'd add something like this to the Watchtower configuration:
Then you can use something like this to pull the logs: