centos8安装docker和docker-compose

it不难
2023-01-20 / 0 评论 / 12 阅读 / 正在检测是否收录...

前言

 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 https://download.docker.com/linux/fedora/30/x86_64/stable/Packages/containerd.io-1.2.6-3.3.fc30.x86_64.rpm
yum install docker-ce  --allowerasing

#启动服务
systemctl enable docker.service
systemctl start docker.service
docker version

#安装docker-compose
yum -y install epel-release
dnf install -y python3
dnf install python3-paramiko
pip3 install docker-compose

#查看版本信息
docker-compose version

0

评论 (0)

取消