天天看点

CentOS 7安装docker-ce(yum安装)

 一、参考链接

阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区 (aliyun.com) Docker CE 镜像

CentOS 7安装docker-ce

1先安装必要系统工具

sudo yum install -y yum-utils device-mapper-persistent-data lvm2      
CentOS 7安装docker-ce(yum安装)
CentOS 7安装docker-ce(yum安装)
CentOS 7安装docker-ce(yum安装)
CentOS 7安装docker-ce(yum安装)

添加阿里的源

sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo      
sudo sed -i 's+download.docker.com+mirrors.aliyun.com/docker-ce+' /etc/yum.repos.d/docker-ce.repo      
CentOS 7安装docker-ce(yum安装)
CentOS 7安装docker-ce(yum安装)

安装

sudo yum makecache fast
sudo yum -y install docker-ce      
CentOS 7安装docker-ce(yum安装)
CentOS 7安装docker-ce(yum安装)
CentOS 7安装docker-ce(yum安装)

开启docker

sudo service docker start      
CentOS 7安装docker-ce(yum安装)
CentOS 7安装docker-ce(yum安装)

检查版本

docker version      
CentOS 7安装docker-ce(yum安装)