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

CentOS中安装Docker及Docker-compose

升级组件:

yum update -y

移除旧版Docker及其组件:

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

升级Yum组件及添加Docker源:

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

安装Docker引擎:

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

设置自动启动:

systemctl start docker
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

大功告成!

赞(1)
未经允许不得转载:无忧解决网 » CentOS中安装Docker及Docker-compose

登录

找回密码

注册