安装基础组件
yum install -y yum-utils device-mapper-persistent-data lvm2
安装yum源
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
安装docker-ce
yum list docker-ce --showduplicates
yum install docker-ce -y
停掉防火墙并启动docker
systemctl stop firewalld
systemctl disable firewalld
systemctl enable docker
systemctl start docker
docker-compose编排工具的安装最好以第二种国内镜像安装。
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/bin/docker-compose
chmod +x /usr/bin/docker-compose
curl http://www.storeall.cn/update/docker-compose -o /usr/bin/docker-compose
chmod +x /usr/bin/docker-compose