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
Fix merge issue tty #4882
Fix merge issue tty #4882
Conversation
I think this solution is good. |
ping @shykes could you take look? Pretty huge change. I think we should just return an error if the image requires tty but the client didn't provide it. Maybe even automatically set the tty if the image need it, but it would be magical. However, because of the automatic merge, a lot of images has been created with 'requires a tty' where it does not.. |
From a user perspective, outputting some information would be welcome. I don't know if containers will always fail if tty is missing, so refusing to run may not be necessary in all cases? If a message is shown that the container may be requiring a tty, this will assist the user in resolving the problem if the container fails to run properly. Something like; |
I'm voting for this approach because right now there is no such thing as saying "this image requires a tty" |
(sorry I posted this in the wrong issue last week...) I agree with this as an immediate solution.. I prefer moving away from "magical merging" Longer term, it would be nice to have a TTY build instruction to specify "the default entrypoint
I will leave this long-term discussion for later. |
(also posted this in the wrong issue last weeek...) @vieux could you move the test from After that I think we can merge. Sorry for the slow review. |
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
LGTM |
Based on the threads listed below, this should resolve the issue, which is related to building an image with the interactive terminal flag (-t) but then running it without the flag. moby/moby#4882 moby/moby#4857 moby/moby#5327 Change-Type: patch
Based on the threads listed below, this should resolve the issue, which is related to building an image with the interactive terminal flag (-t) but then running it without the flag. moby/moby#4882 moby/moby#4857 moby/moby#5327 Change-Type: patch
fix #4857
If you run a container with
-t
and then commit it. If you start to run an another container based on this image without-t
you'll get an error, because the client will expect ano-tty
communication, but the container will inherit from the imagetty
One solution (this PR) is to not merge the -i and -tty stuff from parent.
Another solution would be to fall back to display a warning and prevent the run if the client/deamon aren't in the same mode.
/cc @creack @shykes @crosbymichael