Managing Containers
Learn how to run a container and exit from it without terminating it.
We'll cover the following...
Start a container from the image
If you’ve been following along, you’ll have a copy of the ubuntu:latest
image on your Docker host, and you can use the docker run
command to start a container from it.
Run the following docker run
command to start a new container called test
from the ubuntu:latest
image.
Press + to interact
$ docker run --name test -it ubuntu:latest bashroot@bbd2e5ad1817:/#
Notice how your shell prompt has changed. This is because the container is already running, and your shell is attached to it.