Reputation: 440
I have searched around and found some similar questions, but no answer seemed to clarify completely.
Scenario: Newer images keep getting pushed to the concerned Docker registry. I want to use docker-compose to always pull the latest image from the registry and then replace the existing running container on the Docker host with a new container deployed from that latest image.
Is just executing 'docker-compose up -d' enough? Or do I need to do a 'docker-compose pull' or any other step before that?
Upvotes: 5
Views: 5092
Reputation: 2223
You won't pull new service images just running this command:
docker-compose up -d
If you need to always check for a newer image and use it this command should work for you:
docker-compose pull && docker-compose up -d
Upvotes: 10