| 组件 | 版本 |
|---|---|
| Centos | 8.0.1905 |
| Docker | 20.10.16 |
# 备份原来而皮脂 cd /etc/yum.repos.d cp CentOS-Base.repo CentOS-Base.repo.bak # 下载阿里云的配置 wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo三、Docker安装 1、配置镜像
# 安装yum-utils yum install yum-utils # 设置镜像仓库地址 yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo2、查看版本
yum list docker-ce --showduplicates | sort -r3、安装版本
通过其完整的软件包名称安装特定版本,该软件包名称是软件包名称(docker-ce)加上版本字符串(第二列),从第一个冒号(:)一直到第一个连字符,并用连字符(-)分隔。例如:docker-ce-20.10.16。
# 指定20.10.3版本进行安装 sudo yum install --allowerasing docker-ce-20.10.16 docker-ce-cli-20.10.16 containerd.io4、启动Docker
# 开机自启动 sudo systemctl enable docker # 启动Docker sudo systemctl start docker # 验证安装 sudo docker run hello-world四、错误总结 1、Error: Failed to synchronize cache for repo ‘AppStream’
参考第二步yum源设置
可以逐个修改CentOS-AppStream.repo、CentOS-Base.repo、CentOS-Extras.repo、CentOS-PowerTools.repo文件中的baseurl
参考链接
出现这个问题是由于系统没有正确设置locale环境, 而locale是用于设置本地环境的比如:语言、时区、数字等
echo "export LC_ALL=en_US.UTF-8" >> /etc/profile source /etc/profile
参考链接
3、Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime errorrunc did not terminate successfully: exit status 127
系统没有runc,需要安装libseccomp
yum install -y libseccomp-devel
参考链接
五、参考鸣谢Centos8上安装docker



