centos7安装docker
centos7安装docker
1、安装依赖
yum install -y yum-utils device-mapper-persistent-data lvm2
2、添加软件源
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
3、安装docker-ce
yum clean all yum makecache fast yum -y install docker-ce
4、启动服务
systemctl start docker
5、查看版本
docker version
6、加速拉取镜像
vi /etc/docker/daemon.json { "registry-mirrors": ["https://i8tth4vo.mirror.aliyuncs.com"] } systemctl restart docker