I enjoy a lot using docker-compose.
Eg. on my server, when I want to update my app with minor changes, I only need to git pull origin master && docker-comp
Use the --build
flag to the up
command, along with the -d
flag to run your containers in the background:
docker-compose up -d --build
This will rebuild all images defined in your compose file, then restart any containers whose images have changed.
-d
assumes that you don't want to keep everything running in your shell foreground. This makes it act more like restart
, but it's not required.