yum install -y yum-utils device-mapper-persistent-data lvm2添加阿里源信息
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo查看可用docker版本
yum list docker-ce --showduplicates | sort -r安装docker
yum install docker-ce-18.03.1.ce-1.el7.centos//启动
systemctl start docker//停止dcoker
systemctl stop docker//设置开机启动
systemctl enable docker//重启docker
systemctl restart docker//查看docker
docker infoDocker容器自动启动设置
docker update --restart=always <CONTAINER ID>关闭自动重启
docker update restart=no <CONTAINER ID>