WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

podman-compose exec with --detach option fails to detach #1335

@austinjkee

Description

@austinjkee

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:

  1. Bring up a pod with daemonic services (i.e.: podman compose up -d)
  2. 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

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions