1、安装docker
yum -y install docker

出现完毕(complete)则表示安装完成

2、启动docker服务
systemctl start docker
报错如下,让通过 systemctl status docker.service 和 journalctl -xe 命令查看详情

输入systemctl status docker.service,发现 docker不支持图像内核驱动:SELinux不支持这个内核上的OrthALA2图形驱动程序

解决如下,编辑docker配置文件,再selinux-enable后面添加“=false”
vim /etc/sysconfig/docker

wq保存退出
再次启动docker,成功
systemctl start docker
设置docker开机启动
ststemctl enable docker.service

3、下载安装docker-compose到/usr/local/bin下面,被拒绝连接就多试几次
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
如果慢的话使用sudo curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

4、 对二进制文件应用可执行权限
sudo chmod +x /usr/local/bin/docker-compose
创建链接,这样才能直接使用docker-compose命令
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

5、查看是否安装git
git --version
没有的话就安装
yum -y install git

查看是否安装成功 git --version
