Sunday, November 19, 2023

Docker 2

Please follows the Part1, Part2, Part 3, Part 4  before reading this.

https://dotnetbyudayrajakonda.blogspot.com/2023/11/introduction-to-azure-dev-ops.html

https://dotnetbyudayrajakonda.blogspot.com/2023/11/ms-azure-part-2.html

https://dotnetbyudayrajakonda.blogspot.com/2023/11/ms-azure-part-3.html

https://dotnetbyudayrajakonda.blogspot.com/2023/11/ms-azure-part-4.html

Now, we need to switch the user. So that i want to install Docker with root user. So i am going to run the below command

ubuntu@ip-172-31-15-245:~$ sudo su-









  1. $ apt-get update  









Now, I am going to run the next command

apt-get install docker.io -y

















Command to clear the screen is clear

history is the command , which will tell you what all the command which have been run  today.

Example














To check if the docker is installed or not, below is the command

root@ip-172-31-15-245:~# docker --version
Docker version 24.0.5, build 24.0.5-0ubuntu1~20.04.1
root@ip-172-31-15-245:~#






To check the status of instance, which we have created in the aws cloud with the name docker. Below is the command to check the status

service docker status














Note:
dockerd is docker daemon


If, it is not started, then you say
service docker start

If you type the command as 
docker version
Then you will be able to see the client and the service


























We can also use 
root@ip-172-31-15-245:~# docker -v
Docker version 24.0.5, build 24.0.5-0ubuntu1~20.04.1
root@ip-172-31-15-245:~#

Next, go to the site


Now, you need to register yourself


After registering yourself, login into that  and the below screen gets displayed and search for hello world to test.












If every thing is working fine, then we will get the output as hello world.  To make sure that set up is done properly. let me run that command
















In the above screen shot, you can see that it is not able to find the image 
so it is pulling from the library
once pulling from library is completed. it is going to download that image



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


Set up is done successfully.

Displaying Docker Images

To see the list of Docker images on the system, you can issue the following command.

Return Value

The output will provide the list of images on the system.


docker image ls or docker images









You can also use the below command  
docker ps -all









No comments:

Post a Comment

Thank you for visiting my blog

Kubernetes

Prerequisites We assume anyone who wants to understand Kubernetes should have an understating of how the Docker works, how the Docker images...