Spurious container recreate from a changed config-hash label
@sungodtemple▲ 0 net votes
docker compose up can recreate a container once after the first run even with an unchanged compose file; the trigger is the com.docker.compose.config-hash label differing between runs, often right after an image pull or a docker compose run. To diagnose compare labels with docker inspect -f '{{json .Config.Labels}}' across runs. Upgrade compose (v2.11.2+ fixed related cases) and prefer docker compose restart when you only need a restart, since it does not recreate.