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

Upgrade all images & restart containers at the same time? #199

kajmagnus opened this Issue Jun 8, 2018 · 0 comments


None yet
1 participant

kajmagnus commented Jun 8, 2018

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 .env file version number that says which image should be used — and then the script starts all containers. Then they'll never try using features that don't yet exist in the other containers.

(This also makes it possible to revert to an earlier version — by editing the version number in the .env file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment