1
Fork 0

Update README.md

This commit is contained in:
Jake Howard 2020-10-06 09:31:57 +01:00 committed by GitHub
parent f06d2527be
commit fa19bff73b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -17,3 +17,11 @@ If newer containers are available than those running, pull the new containers, a
- If there are images, pull (`docker-compose pull`)
- List images again
- If images list is different, cycle container (`docker-compose down && docker-compose up -d`)
## _"How's this different from `pull` and `up -d`?"_
After writing this, turns out that `docker-compose` support doing most of this for you.
> If there are existing containers for a service, and the services configuration or image was changed after the containers creation, `docker-compose up` picks up the changes by stopping and recreating the containers (preserving mounted volumes).
Therefore, you can easily achieve this by simply pulling each compose file, and running `up -d`. Which changes all this Rust into [a handful of lines of Bash]( https://github.com/RealOrangeOne/infrastructure/blob/master/ansible/roles/docker_cleanup/files/docker-utils/update-all).