ubuntu:docker:launch_a_docker_container
Differences
This shows you the differences between two versions of the page.
ubuntu:docker:launch_a_docker_container [2019/11/27 01:09] – created peter | ubuntu:docker:launch_a_docker_container [2020/04/15 21:37] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Ubuntu - 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. | ||
- | |||
- | If the image doesn' | ||
- | |||
- | It’s important to note that containers are designed to stop once the command executed within them has exited. | ||
- | |||
- | <code bash> | ||
- | docker run ubuntu /bin/echo hello world | ||
- | </ | ||
- | |||
- | <WRAP info> | ||
- | **NOTE**: | ||
- | </ | ||
- | |||
- | |||
- | ---- | ||
- | |||
- | An alternative method is: | ||
- | |||
- | <code bash> | ||
- | docker run -ti ubuntu | ||
- | </ | ||
- | |||
- | * **-t**: | ||
- | * **-i**: | ||
- | |||
- | This allows continuous use of the container until the terminal is exited by running the " | ||
ubuntu/docker/launch_a_docker_container.1574816964.txt.gz · Last modified: 2020/07/15 09:30 (external edit)