Open andrin55 opened 2 weeks ago
Hm. Don't know how much we can help here. Dependencies being hard is baked deep into libpod, so replacing a container that has other containers depending on it is not possible in our design.
Maybe it could remove and then re-create them instead of failing?
Issue Description
When using multiple containers in a compose file which are dependent on each other and share the same network namespace, they cannot be recreated. This only happens in Podman and not in Docker.
Steps to reproduce the issue
Steps to reproduce the issue
docker-compose up -d --always-recreate-deps --force-recreate
Describe the results you received
The container re-creation fails with:
Error response from daemon: container 34e683d853c2a8a334ba1fc74c0801a982b3a40fa3d9156dc91ed3960ccf2d0f has dependent containers which must be removed before it: 1b075e6e5b99890c0366d78d8d0fb83d2c9e48076c95b393008e31d5783a2891: container already exists
Describe the results you expected
The containers should be recreated as usually. This works on docker-ce (tested on version 24.0.9).
podman info output
Podman in a container
No
Privileged Or Rootless
Privileged
Upstream Latest Release
No
Additional environment details
Docker Compose version v2.26.0
Additional information
No response