Each parameter represents what it means, at the bottom of the text.
#搜索名称含有centos的镜像
Docker Search CentOS
#查看当前系统拥有的镜像
Docker images
#获取名称为centos的镜像
Docker Pull CentOS
#删除名称为centos的镜像
Docker RMI CentOS
#强制删除名称为centos的镜像
Docker Rmi-f CentOS
#使用centos镜像运行一个容器, the echo command is executed inside the container (the container closes after the end)
Docker run Centos/bin/echo ' hellow word '
#启动一个已停止的容器
Docker start d6504d6a6c76
#使用centos镜像运行一个容器, the container name is MYCENTOS01, the host name of the specified container is local, remains open, and a TTY is opened (that is, start the container and enter the container)
Docker run-it--name mycentos01-h Local CentOS
#获取容器名称为mycentos01的pid
Docker Inspect--format "{{. State.pid}} "mycentos01
-I. |
Let the container out of the open state |
-T |
Turn on a pseudo terminal |
--name |
Give a name to a container |
-D |
Let the container run in the background |
-H |
Specify container host Name |
|
|
(not finished)
This article is from "the blog of the Flower in the Love Mirror" blog, please make sure to keep this source http://qingmi.blog.51cto.com/11352461/1760660
Docker Common Commands