Docker learning-the fourth Hello World example

First, run the Docker image hello-world

Enter the following command on the CLI client

docker run hello-world

Console output

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
ca4f61b1923c: Pull complete
Digest: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

The above implementation process can be summarized as:

  1. Docker client executes docker run command
  2. Docker daemon found no hello-world image locally
  3. daemon download image from Docker Hub
  4. The download is complete and the image hello-world is saved locally
  5. Docker daemon starts the container

Second, list the local mirror

docker images

Third, list the containers that hello-world exits after displaying the message

docker container ls --all

You can also docker psor docker container lsdisplay a running container, we can see, hello-world after the prompt information will stop running, the container is automatically terminated, so when using these commands to view will find no vessel in operation.

Published 40 original articles · 25 praises · 100,000+ views

Guess you like

Origin blog.csdn.net/yym373872996/article/details/105678141