I want to pull and restart a docker service everyday at the same time but only if there's a new image available. Is there a docker command that returns true where I can run my update service?
Eg something like
docker new-update-available myname/myimage && ./myupdateandrestart.sh
You only need two commands (or a very simple shell script):
docker-compose pull
docker-compose up -d
The pull retrieves all updated images defined in your docker-compose.yml. And the up will restart any containers if they are running on older images, but otherwise leave a running instance of your application alone.
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