Last active
December 24, 2015 11:59
-
-
Save aanand/6795151 to your computer and use it in GitHub Desktop.
Discrepancy in behaviour of docker run-with-immediate-attach vs run-and-then-attach
This file contains 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
# Normal run, without -d. | |
# Container prompt appears immediately; after exiting, system prompt appears on new line. | |
$ docker run -i -t ubuntu bash | |
root@0b3fa3041e3f:/# exit | |
exit | |
$ | |
# Now run with -d and *then* attach. | |
# Container prompt doesn't appear until I hit Enter; after exiting, system prompt appears on same line. | |
$ docker run -i -t -d ubuntu bash | |
9c1bcb6ed547 | |
$ docker attach 9c1bcb6ed547 | |
<PRESS ENTER> | |
root@9c1bcb6ed547:/# exit | |
exit$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment