Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for turning off --interactive flag for podman-compose exec command #900

Open
thomas-tharp opened this issue Mar 22, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@thomas-tharp
Copy link

thomas-tharp commented Mar 22, 2024

Is your feature request related to a problem? Please describe.
When using podman-compose to exec into a container, the resulting podman exec command always has the --interactive flag appended (code ref).

Currently, I'm attempting to use this in a timeout loop in a Makefile - essentially waiting until a certain command run in a container returns successfully. When --interactive is specified, the loop hangs (since stdin stays open) until the timeout triggers. If I use podman exec directly, non-interactively, the command succeeds.

Describe the solution you'd like
In docker-compose, you can specify docker-compose exec -i=false to turn off the default interactive flag (this flag is marked as hidden, see code reference here). Ideally I'd like to add a similar flag (does not need to be hidden I don't think) to podman-compose exec to allow disabling interactive mode.

Describe alternatives you've considered
I've tried using podman exec directly for this use case. However, I've found no deterministic way to retrieve the container name. Some of our team uses podman and some use docker - the naming schemes for how to append the compose project name to the container name differ, and I've found no way in podman-compose to return a container name given a service name.

Additional context
Add any other context or screenshots about the feature request here.

@thomas-tharp thomas-tharp added the enhancement New feature or request label Mar 22, 2024
@p12tic
Copy link
Collaborator

p12tic commented May 1, 2024

The feature request makes sense. Feel free to open a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants