Cloud Computing docker commonly used commands


Keywords: docker centos7 pull list remove


1. Pull / download image docker pull

$ docker pull centos:7.6.1810



2. List all local docker mirror

$ docker images


3. Specify docker mirror in the background

$ docker run -itd --name centos-test [ImageId] /bin/bash


4. See all docker container running

$ docker ps


5 to enter a vessel running a docker

$ docker attach [ContainerID | ContainerName]


6. Stop docker container

6.1 designated stop a docker container

$ docker stop [ContainerID]

6.2 Stop all docker container

$ docker stop $(docker ps -a -q)


7. Delete docker container

7.1 Specifies to delete a docker container

$ docker rm [ContainerID]

7.2 Delete all docker container

$ docker rm $(docker ps -a -q)


8. Delete docker Mirror

8.1 Specifies to delete a docker image

$ docker rmi [ImageID]

8.2 Delete all docker Mirror

$ docker rmi $(docker images -q)

Finally: Reference Document

1.Docker used CentOS7 mirror https://blog.csdn.net/u012767761/article/details/78107870

Published 204 original articles · won praise 59 · Views 140,000 +

Guess you like

Origin blog.csdn.net/baidu_34122324/article/details/105176097