Skip to content

Instantly share code, notes, and snippets.

@samcrosoft
Last active September 10, 2018 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samcrosoft/bb3415044dac218dcf4dc81dcc4b37a7 to your computer and use it in GitHub Desktop.
Save samcrosoft/bb3415044dac218dcf4dc81dcc4b37a7 to your computer and use it in GitHub Desktop.
Running A Docker Container Interactively and Start In Bash
# 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