Once we install Docker and make sure it is up and running we
can start running our first Docker
Container. Let us run the hello-world Docker container, this container is
present in the DockerHub. We will use the docker run command to run the
container as follows.
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
0e03bdcc26d7: Pull complete
Digest: sha256:7f0a9f93b4aa3022c3a4c147a449bf11e0941a1fd0bf4a8e6c9408b2600777c5
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
Once we execure the command the Docker Engine tries to locate the hello-word image in the local
system, since we don’t have the hello-world image it automatically downloads
the hello-world image from DockerHub,
once downloaded it activates the image to span up the container and displays
the message Hello from Docker!
No comments:
Post a Comment