docker:launch_a_docker_container
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
docker:launch_a_docker_container [2016/10/17 08:35] – created peter | docker:launch_a_docker_container [2019/11/27 01:08] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Docker - Launch a Docker Container ====== | ||
- | |||
- | Launching a container is simple as **docker run** + the image name you would like to run + the command to run within the container. | ||
- | |||
- | <code bash> | ||
- | docker run ubuntu /bin/echo hello world | ||
- | </ | ||
- | |||
- | Let’s launch an Ubuntu container and install Apache inside of it using the bash prompt: | ||
- | |||
- | <code bash> | ||
- | docker run -t -i ubuntu /bin/bash | ||
- | </ | ||
- | |||
- | The -t and -i flags allocate a pseudo-tty and keep stdin open even if not attached. | ||
docker/launch_a_docker_container.1476693342.txt.gz · Last modified: 2020/07/15 09:30 (external edit)