1.安装docker
wget -O /etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum -y install docker-ce
systemctl enable docker
systemctl start docker
2.安装docker-compose
2.1 方式一
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum install docker-compose -y (需要epel源)
2.2 方式二:根据自己所需版本安装
image.png
image.png
image.png
#1.下载
wget https://github.com/docker/compose/releases/download/v2.6.0/docker-compose-linux-x86_64
#2.安装及测试
# ls
docker-compose-linux-x86_64
# chmod +x docker-compose-linux-x86_64
# mv docker-compose-linux-x86_64 /usr/bin/docker-compose
# docker-compose version
Docker Compose version v2.6.0
网友评论