Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Upgrade all images & restart containers at the same time? #199
Is there a way to have Watchtower download new versions of all images, then shutdown and restart all containers simultaneously?
An app I'm developing has many Docker images. If they're upgraded & restarted independently of each other, one container might start using [features in another container] that don't yet exist, because that other container hasn't been upgraded yet (e.g. takes longer to download, because larger image). That can result in errors.
Example: The app server container, might try to use PostgreSQL features in the database container — before those features exists (a too old db image in use). Or the http server container could call not-yet-existing http endpoints on the app server, or vice versa.
Making all images compatible with the previous version of all other images = that can be problematic, in some cases ... and hard to test properly.
Currently I run a Bash script that pulls the new version x.y.z of all images (they're tagged with the same version, all of them). Then the script shuts down all containers, upgrades the Docker-Compose
(This also makes it possible to revert to an earlier version — by editing the version number in the