When does Compose recreate a container?
IntermediateConceptDocker Compose
Answer
On up, when the service's config hash changed (image, env, command, volumes, etc.) or its image ID changed after a pull/build. Force with --force-recreate; avoid with --no-recreate. Editing an env file without changing the resolved config does nothing.
More on Docker Compose
What is Docker Compose and what problem does it solve?Beginner`docker-compose` vs `docker compose`?BeginnerShow a minimal Compose file with a web app and a database.BeginnerWhat does `depends_on` guarantee?IntermediateHow do containers in Compose reach each other?BeginnerHow does Compose choose the project name and why does it matter?Intermediate