1.Docker Installation steps:
1.yum Install epel-release #安装 epel ' extension library 2.yum install Docker-io #开始安装 ' Docker '. On ' CentOS 6 ', the ' Docker ' package is in the extension library, called ' Docker-io ', and the ' CentOS 7 ' has been added to the official repo, and the soft package name is also called ' Docker '.
3.service Docker start #启动docker服务
4.chkconfig Docker on #开机启动
5.Docker pullcentos:6 # Download centOS6 version image
2.Docker Common commands:
1. View the containers that are running
Docker PS
Docker Ps-a为查看所有的容器,包括已经停止的。
2. View all Mirrors
Docker Images-a
3. View Container Logs
Docker Logs-f < container name or id>
4. Remove all containers
Docker RM $ (Docker ps-a-Q)
5. Delete a single container
Docker RM < container name or id>
6. Stop, start, kill a container
Docker Stop < container name or id>
Docker start < container name or id>
Docker Kill < container name or id>
7. Remove all Mirrors
Docker RMI $ (Docker images | grep none | awk ' {print $} ' |sort-r)
8.
Docker Learning Notes