centos8安装docker与docker-compose
参考:https://docs.docker.com/install/linux/docker-ce/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 list docker-ce --showduplicates | sort -r
# 安装指定版本
yum install docker-ce-18.09.1 -y
#启动docker
systemctl start docker
#验证是否安装成功
docker run hello-world
#安装docker-compose
curl -L https://github.com/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
#赋予权限
chmod +x /usr/local/bin/docker-compose
#查看版本
docker-compose --version