-
Notifications
You must be signed in to change notification settings - Fork 530
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
podman compose down should not stop dependencies
To Reproduce
services:
db:
image: localhost/t1:latest
app1:
image: localhost/t1:latest
depends_on:
- db
app2:
image: localhost/t1:latest
depends_on:
- db
# podman-compose up -d
d0c9a5d152f197efc8eace8c79cc51d57091a9102e1131397e0db9867095258b
b0ab89d9390e37e4d0524779b5820d52f2ee1ff3a79c36c24c4cd1a293e120cf
t1_db_1
f543a8b9c9f0f0c47a0a5dcfb7e570d974e805b522d76642a8f45b7a084ee613
t1_app1_1
5c2971f58d238e08489b98146eded94d8c5c74c443e1d4a967fdbcdce9f8ab26
t1_app2_1
Expected behavior
podman-compose should not remove upstream services because it is possible that multiple services depends on that service. I want to be able to stop a single service to update it manually since podman-compose doesn't support --watch yet.
Similar to docker compose: https://stackoverflow.com/questions/77267494/docker-compose-do-not-exit-depends-on-containers-on-exit-why
Actual behavior
If i try to stop one single service, upstream service is stopped as well
# podman-compose down app1
WARN[0010] StopSignal SIGTERM failed to stop container t1_app1_1 in 10 seconds, resorting to SIGKILL
WARN[0010] StopSignal SIGTERM failed to stop container t1_db_1 in 10 seconds, resorting to SIGKILL
t1_app1_1
t1_db_1
t1_app1_1
Error: container b0ab89d9390e37e4d0524779b5820d52f2ee1ff3a79c36c24c4cd1a293e120cf has dependent containers which must be removed before it: 5c2971f58d238e08489b98146eded94d8c5c74c443e1d4a967fdbcdce9f8ab26: container already exists
# podman ps -a | grep t1_
b0ab89d9390e localhost/t1:latest 7 minutes ago Exited (137) 7 minutes ago t1_db_1
5c2971f58d23 localhost/t1:latest 7 minutes ago Up 7 minutes
Output
# podman-compose version
podman-compose version 1.4.0
podman version 5.4.0
...
Environment:
- OS: Linux / WSL / Mac
- podman version:
- podman compose version: (git hex)
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working