CentOS 8.1 安装docker-ce
添加docker-ce的yum源
实际上,添加的这个yum源仍然是el7的
yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
安装依赖包:
yum install https://download.docker.com/linux/fedora/30/x86_64/stable/Packages/containerd.io-1.2.6-3.3.fc30.x86_64.rpm
Install Docker Engine
安装docker-ce
yum install docker-ce -y
安装docker-ce报错:
file /usr/share/man/man1/docker-volume.1.gz from install of docker-ce-cli-1:19.03.8-3.el7.x86_64 conflicts with file from package podman-manpages-1.4.2-5.module_el8.1.0+237+63e26edc.noarch
解决方法:
yum remove podman-manpages -y
然后重新安装docker-ce即可
docker 国内源
mkdir -p /etc/docker
tee /etc/docker/daemon.json <<EOF
{
"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"],
"registry-mirrors": ["https://mirror.ccs.tencentyun.com"],
"registry-mirrors": ["https://registry.docker-cn.com"],
"registry-mirrors": ["http://hub-mirror.c.163.com"]
}
EOF