docker-engine install(centos7.2)
[root@docker ~]# vim /tmp/docker-ce-install.sh
#/bin/bash
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-config-manager --enable docker-ce-edge
yum-config-manager --enable docker-ce-test
yum makecache fast
yum install -y docker-ce
#yum list docker-ce.x86_64 --showduplicates
systemctl enable docker
systemctl start docker
镜像加速
版本不同,方法不同,
新版本方法:
[root@master ~]# vim /etc/systemd/system/multi-user.target.wants/docker.service
ExecStart=/usr/bin/dockerd --registry-mirror=https://jxus37ad.mirror.aliyuncs.com
老版本方法:
[root@node01 ~]# vim /etc/docker/daemon.json
{
"registry-mirrors":["https://jxus37ad.mirror.aliyuncs.com"]
}
systemctl daemon-reload
systemctl restart docker.service