If a docker compose service stops for some reason, and is restarted automatically due to having a restart_policy
, will it also re-create the container if:
The docker image has changed? (For example if I'm using node:latest and have done docker pull node:latest and downloaded a newer image.)
The docker image name has changed? (For example if I'm using an env var in the image name in docker-compose.yml, and the env var has changed.)
Or will it always just try to restart the existing docker container?
It will always just restart the existing docker container.