1.下载包:https://pan.baidu.com/s/1iPog3IQjYXn7Q5s5X3uKmw
2.将以上安装包上传至服务器后,执行以下命令
rpm -ivh docker-ce-cli-18.09.8-3.el7.x86_64.rpm
rpm -ivh container-selinux-2.107-3.el7.noarch.rpm --force --nodeps
rpm -ivh containerd.io-1.2.2-3.el7.x86_64.rpm
rpm -ivh libcgroup-0.41-21.el7.x86_64.rpm
rpm -ivh libseccomp-2.3.1-4.el7.x86_64.rpm
rpm -ivh docker-ce-18.09.8-3.el7.x86_64.rpm
3.启动docker
systemctl start docker
4.验证docker是否启动成功
dockers version
5.加入启动项
systemctl enable docker
6.安装docker-compose
mv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose
7.验证安装是否成功
docker-compose -v
权限不够,执行以下命令
chmod +x /usr/local/bin/docker-compose