CentOS 8 安装 docker/docker-compose
蓝飞鱼4年前 (2020-12-10)技术3210
安装依赖
sudo dnf -y install yum-utils device-mapper-persistent-data lvm2sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo123
先装新版的 containerd.io
访问 镜像资料 获取最新的安装包
dnf -y install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.13-3.2.el7.x86_64.rpm1
安装docker-ce
、docker-ce-cli
sudo dnf -y install docker-ce docker-ce-cli1
启动docker
# 启动sudo systemctl start docker# 查看状态systemctl status docker# 停止systemctl stop docker12345678
查看docker
版本
docker version1
开机启动
sudo systemctl enable docker1
安装docker-compose
方法一:
docker-compose版本选择
curl -L https://github.com/docker/compose/releases/download/1.26.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-composechmod +x /usr/local/bin/docker-compose123
查看docker-compose
版本
docker-compose version1
方法二:
1、安装python-pip
yum -y install epel-release
dnf install -y python3
dnf install python3-paramiko123
2、安装docker-compose
pip3 install docker-compose
转自:https://blog.csdn.net/qq_32828933/article/details/104220570