Skip to main content

Command Palette

Search for a command to run...

Docker Compose Recreates Containers After 5.5 Upgrade

Updated
1 min readView as Markdown

Originally published on DevToolHub.

Docker Compose 5.5 recreates containers on the first compose up after upgrading. That's expected — the release overhauled image digest reconciliation, and containers created under the old logic look "different" to the new one, even with no config changes.

Why It Happens Once

Compose reconciles every service against the new digest logic on the first post-upgrade run. After that, it's stable — unchanged services stay running exactly like before.

The Bug Behind It

Compose v2 has a recurring complaint: containers recreating for no visible reason. A 2023 GitHub issue documents exactly that — fixed then as a one-off, resurfaced since. 5.5's digest overhaul looks like Docker addressing the root cause.

Also in 5.5

pull_policy refresh windows (daily/weekly/every_N) now actually work. Build-only services skip pulling unused default images. Compose stopped pruning every dangling image in a project.

What to Check

Run docker compose config --hash "*" before upgrading. Treat the first post-upgrade compose up like a deploy if services have real startup cost or tight health checks.

Verdict

Upgrade for most setups. Schedule it carefully only if you have strict uptime needs and no rolling-deploy story.

Full writeup: devtoolhub.com/docker-compose-recreates-containers