compose/pkg
Nicolas De Loof d8cf81d432 fix(up): recreate a stopped container whose network was removed
A stopped container still refers to the networks it was attached to. When
one of them was removed, up created the network again but started the old
container, and the engine refused: "network <id> not found".

The network check of mustRecreate only ran for running containers, so a
stopped one was never compared with the network of the project. It now runs
whatever the state of the container, like the check of the volumes.

A network that no longer exists is not in the observed state, so a container
attached to a network of that name refers to the removed one and is
recreated. A container that was created but never started has no network ID
yet: it is left alone, rather than taken for one attached to another network.

Fixes #14516

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-17 09:14:22 +01:00
..
api chore(api): deprecate the API surface that nothing produces or reads 2026-11-16 17:01:39 +01:00
bridge refactor(compose): share the label filter builders 2026-10-29 11:59:43 +01:00
compose fix(up): recreate a stopped container whose network was removed 2026-11-17 09:14:22 +01:00
dryrun feat(registry): use the Docker Desktop Hub session for Docker Hub credentials 2026-10-07 14:24:28 +02:00
mocks refactor(api): regenerate mocks for the split Compose interfaces 2026-10-12 12:03:29 +02:00
remote fix(oci): tell a null "manifests" from a list, and report a host failure as such 2026-11-12 10:43:27 +01:00
utils fix: make e2e tests pass reliably locally with Docker Desktop 2026-05-18 10:55:41 +02:00
watch golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00