Centos 8 安装 docker(实测有效)
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
sudo yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
rpm -qa | grep podman
sudo dnf remove podman
sudo yum erase podman buildah
sudo yum install docker-ce docker-ce-cli containerd.io
配置镜像加速器
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://apgrrx6f.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
配置完成
sudo docker version
sudo docker run hello-world
sudo docker images
sudo docker ps -a