Last active
September 10, 2018 11:28
-
-
Save samcrosoft/bb3415044dac218dcf4dc81dcc4b37a7 to your computer and use it in GitHub Desktop.
Running A Docker Container Interactively and Start In Bash
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
# Start an ubuntu image and go into shell | |
1) common way | |
$ docker run -it ubuntu:latest /bin/bash | |
2) using entrypoint | |
$ docker run -it --entrypoint bash ubuntu:latest | |
3) full options spelt out | |
$ docker run --interactive --tty --entrypoint bash ubuntu:latest | |
NOTE: you can use /bin/bash or just bash. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment