Running Docker hello world>
The Docker environment is set up and ready, so we can start the first example.
Enter the following command in your console:
$ docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 78445dd45222: Pull complete Digest: sha256:c5515758d4c5e1e838e9cd307f6c6a0d620b5e07e6f927b07d05f6d12a1ac8d7 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. ...
Congratulations, you've just run your first Docker container. I hope you already feel how simple Docker is. Let's examine step-by-step what happened under the hood:
- You ran the Docker client with the
run
command. - The Docker client contacted the Docker daemon asking to create a container from the image called
hello-world
. - The Docker daemon checked if it contained the
hello-world
image locally and, since it didn't, requested thehello-world
image from the remote Docker Hub...