containers / containers/podman-compose
Support for turning off `--interactive` flag for `podman-compose exec` command
- Dominant language
- Python
- Stars
- 6.2k
- Forks
- 622
- PR merge metrics
- No merged PRs in 30d
Description
**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](https://github.com/containers/podman-compose/blob/d704622522c3b4e517b084ad87bd4a15a29311c3/podman_compose.py#L2530)).
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](https://github.com/docker/compose/blob/3371227794f5f3645f4f19829c60a741635ed329/cmd/compose/exec.go#L75)). 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.
Contributor guide
Assessment
This issue has not been assessed yet.