系统相关
首页 > 系统相关> > Centos 8 安装 docker(实测有效)

Centos 8 安装 docker(实测有效)

作者:互联网

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 

标签:Centos,sudo,ce,podman,实测,yum,docker,latest
来源: https://blog.csdn.net/weixin_44153133/article/details/116809963