您的位置:首页 > 运维架构 > Docker

docker安装以及镜像加速

2017-09-12 19:25 375 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: