Monday, November 20, 2023

Docker 3

Please go through part 5 before reading this article

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

Let me create a new container.

Before that let me pull the image of nginx by running the below command

docker pull nginx








Here Digest sha is basically a nasa format

To check all the images, which are downloaded till Now. use the below command 





What all the container we are running we can get by using the below command

Listing of Containers

docker ps(print status)-

One can list all of the containers on the machine via the docker ps command. This command is used to return the currently running containers.

Return Value

The output will show the currently running containers.

Use  docker ps -all command to check all the containers which are running, stopped and paused.


docker ps -a

This command is used to list all of the containers on the system





Now, we need to start the container. Use the below command

root@ip-172-31-15-245:~# docker run -itd --name test123 nginx:latest

In the above command you can see that i have given a name test123

nginx:latest- means it will take the latest one. We can also give the version numbers as well.






To stop the container use the below command

docker stop test123





Now, i want to start the command, then use the below command

doctor start test123




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...