Enterprise Docker Application Chapter 3 Common Docker Instructions

1.docker search image_name #Query the corresponding image from Docker Hub

 

2.docker pull image_name:version #Download the image from Docker Hub , you can specify the version

 

3.docker image #List existing images

 

4. docker ps #List all running containers

 

5.docker rmi images_name #Remove one or more images

 

6.docker rm container_name #Remove the container

 

7.docker history image_name #View the creation history of the specified image

 

8.docker run image_name #Start a container

 

9.docker start|stop|restart container_name #Specify container start | stop | restart

 

10.docker push image_name #push image to Docker hub

 

11.docker top container_name #View the processes in the container

 

12.docker build Dockerfile #Build docker image

 

13.docker attach #Enter the container, and the container will stop running when it exits

 

14. docker exec #Enter the container without affecting the running status of the container

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327047741&siteId=291194637