前言
centos8安装docker和docker-compose
执行命令
#配置yum源
mv /etc/yum.repos.d /etc/yum.repos.d.bak
mkdir -p /etc/yum.repos.d
curl https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo > /etc/yum.repos.d/Centos-vault-8.5.2111.repo
curl https://mirrors.aliyun.com/repo/epel-archive-8.repo > /etc/yum.repos.d/epel-archive-8.repo
#安装软件
yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y https://download.docker.com/linux/fedora/30/x86_64/stable/Packages/containerd.io-1.2.6-3.3.fc30.x86_64.rpm
yum install -y docker-ce --allowerasing
#启动服务
systemctl enable --now docker.service
docker version
#安装docker-compose
yum -y install epel-release
dnf install -y python3
dnf install -y python3-paramiko
pip3 install docker-compose
#查看版本信息
docker-compose version
评论 (0)