- 查看当前所有镜像
docker images
- 下载镜像
docker pull centos
- 运行容器
docker run centos echo "hello word"
- 运行容器 hello word
docker run hello-world
列出docker包的具体的名字
sudo yum list installed | grep docker
docker-ce.x86_64 3:19.03.13-3.el7 @docker-ce-stable
docker-ce-cli.x86_64 1:19.03.13-3.el7 @docker-ce-stable
启动容器
docker start cluster-master
进入容器
docker exec -it cluster-master /bin/bash