I have a docker-compose "cluster" and sometime I update the image files for some containers. I rebuild them using docker-compose build
. I would like to know if there is a way to restart only the containers that have a new image automatically. Ie. I don't want to do docker-compose scale service=0 && docker-compose scale service=3
for all containers I updated.
Thank you very much for your help
This command updates the containers that have a newer image (than the one currently running):
docker-compose up -d --no-deps <service>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With