May 062021
 

默认CentOS yum的Docker版本很低,应该一直都没升级。这次我是真CentOS 7.6 虚拟机里,完成这个测试。

如果以前有安装老版本,需要卸载

yum remove docker  docker-common docker-selinux docker-engine

安装工具

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

添加阿里的docker repo

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

查看一下结果

yum list docker-ce --showduplicates | sort -r

选择一个docker版本来安装

yum install docker-ce-20.10.6

启动相关服务

systemctl start docker
systemctl enable docker

  One Response to “CentOS 7 安装Docker CE”

  1. systemctl enable –now docker

Leave a Reply to 陈沙克 Cancel reply

(required)

(required)

This site uses Akismet to reduce spam. Learn how your comment data is processed.