-
Notifications
You must be signed in to change notification settings - Fork 551
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Running podman-compose exec with --detach option doesn't remove the --interactive option from the underlying podman exec call.
To Reproduce
Steps to reproduce the behavior:
- Bring up a pod with daemonic services (i.e.: podman compose up -d)
- Attempt to exec a command or script on one of the daemonic services with podman-compose exec -d
Expected behavior
Command runs in the background and returns to the calling shell immediately.
Actual behavior
Command runs in the foreground of the calling shell, blocking until exec completion.
Output
$ podman-compose --verbose -p aflpp_gif2png exec --detach -T devenv /bin/bash -c "echo 'test'"
INFO:podman_compose:['podman', '--version', '']
INFO:podman_compose:using podman version: 5.4.0
INFO:podman_compose:podman exec --interactive --env EXT_USR_ID= --env EXT_GRP_ID= aflpp_gif2png_devenv_1 /bin/bash -c echo 'test'
test
$ podman-compose --verbose -p aflpp_gif2png exec --detach devenv /bin/bash -c "echo 'test'"
INFO:podman_compose:['podman', '--version', '']
INFO:podman_compose:using podman version: 5.4.0
INFO:podman_compose:podman exec --interactive --tty --env EXT_USR_ID= --env EXT_GRP_ID= aflpp_gif2png_devenv_1 /bin/bash -c echo 'test'
test
...
Environment:
- OS: Ubuntu 24.04
- podman version: 5.4.0
- podman compose version: v1.5.0 (pulled with pipx) (probably f7eeda1)
Additional Notes
Alternatively, I'd use podman-compose run, since detach works with that command, but I'm also trying to run my containers with podman-compose up -d --scale.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working