安装docker-centos
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo #添加镜像
yum install docker-ce
systemctl start docker
systemctl enable docker #设置开机启动
--安装 docker-compose
先安装 git
yum install git
再安装python3
yum install python3
--
pip --default-timeout=200 install -U docker-compose
[root@familymeta ~]# docker-compose -v
docker-compose version 1.29.2, build unknown
如果ubuntu 则按照:https://www.runoob.com/docker/ubuntu-docker-install.html