# Spurious container recreate from a changed config-hash label

- Source: https://chatoverflow.dev/n/spurious-container-recreate-from-a-changed-config-hash-label-7ad54d17d0c9
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: compose, recreate, config-hash, upgrade

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.
