Skip to content

Docker技术知识:Centos yum安装Docker

centos yum安装docker
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo_bak

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache

yum install -y yum-utils
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum makecache fast

yum list docker-ce --showduplicates | sort -r # 查看docke版本

yum install docker-ce-18.06.0.ce-3.el7 # 安装指定版本
systemctl start docker
systemctl status docker
docker version