所有问题解决方案
我们都已亲身测试

CentOS安装Docker环境

首先移除现有的残留的Docker部件:

sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

安装和添加Docker源:

sudo yum install -y yum-utils

sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

安装:

sudo yum install docker-ce docker-ce-cli containerd.io

安装成功后,启动并设置为自动加载:

sudo systemctl start docker
sudo systemctl enable docker

安装docker-compose:

sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

赞(2)
未经允许不得转载:无忧解决网 » CentOS安装Docker环境

登录

找回密码

注册