DEVNET.

Download, Install and Delete Docker Container

Previous post Beginners Guide To Docker has covered the beginners guide to dockers. In this post, I will be covering more hands on experience. Before we start, I want you to check the previous post and make sure that the docker is up and running. Open a new terminal and type the following command

PS C:windowssystem32> docker images
REPOSITORY TAG IMAGE ID CREATED SIZE

Download and Installing Docker Image
We can see that there are no images installed locally on the laptop. Let’s download a image from the docker public registry which is nothing but docker hub. We need to pull the image first from the docker hub and it will get stored on the local pc.

PS C:windowssystem32> docker pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
9bb5a5d4561a: Pull complete
Digest: sha256:f5233545e43561214ca4891fd1157e1c3c563316ed8e237750d59bde73361e77
Status: Downloaded newer image for hello-world:latest
PS C:windowssystem32>

Once the image is downloaded, we can check the image is locally downloaded by running below mentioned command.

PS C:windowssystem32> docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest e38bc07ac18e 3 weeks ago 1.85kB
PS C:windowssystem32>

Once the image is downloaded, we can run the image locally and test it with below mentioned command.

PS C:windowssystem32> docker run hello-world

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

To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the “hello-world” image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/

For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/

Share:

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *

Become a member

Full Access to 739 Lessons. New Lessons Added Every Week!

Awesome Deal! Get 2 Months for FREE!

No Obligations. Cancel At Any Time!