Increase compatibility for tty/no-tty options#1418
Draft
erikvanoosten wants to merge 1 commit intocontainers:mainfrom
Draft
Increase compatibility for tty/no-tty options#1418erikvanoosten wants to merge 1 commit intocontainers:mainfrom
erikvanoosten wants to merge 1 commit intocontainers:mainfrom
Conversation
Increase compatibility with docker compose for exec and run commands: - Add support for long option `--no-tty` besides `-T`. - Add support for hidden options `-t` and `--tty`. - Make default for tty auto-detected. - For the `exec` command: run `podman exec` without `--interactive` when no-tty is specified (the `run` command already does this). The default for terminal/no-terminal is based on terminal detection, mimicking docker compose code for [run](https://github.com/docker/compose/blob/3371227794f5f3645f4f19829c60a741635ed329/cmd/compose/run.go#L178) and [exec](https://github.com/docker/compose/blob/3371227794f5f3645f4f19829c60a741635ed329/cmd/compose/exec.go#L72). Hidden options `-t` and `--tty` are mimicking docker compose code for [run](https://github.com/docker/compose/blob/3371227794f5f3645f4f19829c60a741635ed329/cmd/compose/run.go#L195-L196) and [exec](https://github.com/docker/compose/blob/3371227794f5f3645f4f19829c60a741635ed329/cmd/compose/exec.go#L77-L78). NOTE: the added integration tests require the `script` command to emulate a TTY. This command is available in most unix environments, but might not be present in a minimal docker image. Fixes containers#900. Signed-off-by: Erik van Oosten <e.vanoosten@grons.nl>
Author
|
When I run the integration tests from the |
Author
|
For the reviewers: Unfortunately, the Convert to draft button doesn't work at the moment! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Increase compatibility with docker compose for exec and run commands for the tty options:
--no-ttybesides-T.-tand--tty.execcommand: delegate topodman execwithout--interactivewhen no-tty is specified.The default for terminal/no-terminal is based on terminal detection, mimicking docker compose code for run and exec.
Hidden options
-tand--ttyare mimicking docker compose code for run and exec.NOTE: the added integration tests require the
scriptcommand to emulate a TTY. This command is available in most unix environments, but might not be present in a minimal docker image.TODO: The
runcommand should perhaps default to--no-ttyand not add-iwhen--detachis used. Todo: find out what docker compose does.Fixes #900.