You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Proposal: add -i and -t flags on docker compose run and exec #9207
The defaults for -t / --tty (allocate a pseudo-TTY) and -i / --interactive (Keep STDIN open even if not attached) for docker compose exec and docker compose run are exactly the reverse as the corresponding docker (container) run / docker container exec commands.
For docker compose, users can disable these options using the -T / --no-TTY options; we'll unlikely be able to change these defaults on either side (also see #9202), but we could make the UX slightly more compatible by adding the same flags to docker compose subcommands.
Currently, trying to use the -i and/or -t options will produce an error;
I propose to add these flags to (at least) the run and exec subcommands. Setting those options won't have an effect (as they're already set by default), but it allows users to use the same options when using compose (which can be just due to "muscle memory");
Add -t / --tty flag, with a default of true
Add -i / --interactive flag with a default of true
Produce an error passing both-t or -iand-T (conflicting options)
I should note that there's other commands on the docker / docker container that also accept -t and/or -i, such as docker (container) create, and a --no-stdin on docker (container) attach (but compose does not yet have an equivalent to that).
Activity
ndeloof commentedon Feb 25, 2022
Makes sense to me.
We need compose and cli UX to align so that user don't get frustrated having to learn twice how to use docker tooling.