If you run yml with docker-compose, you can just run docker-compose up -d and it will recreate any containers that have changes and leave all the services unchanged untouched.
$ cat docker-compose.env2.yml version: '2' services: test: image: busybox
If you run containers like docker stack deploy -c docker-compose.yml with a version 3 format file, you can perform a rolling service update that will prevent downtime if you have multiple instances of your service. This functionality is still very new, you will need 1.13.1 to fix some problems with updates, and, as with anything new, bugs are still being developed.
BMitch
source share