安装依赖

yum install -y yum-utils device-mapper-persistent-data lvm2

更换repo

yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

安装docker-ce

yum install docker-ce

验证docker

sudo systemctl start docker
sudo docker run hello-world

在这里插入图片描述

docker使用报错

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
systemctl daemon-reload
sudo service docker restart
sudo service docker status 
docker images
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐