Interview Prep/Docker/Docker Compose

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.

All Docker questions Roadmap: Docker & containers

More on Docker Compose