Docker 实现阿里云加速

2018-06-03  本文已影响325人  FantJ

阿里云加速

[root@FantJ ~]# tee /etc/docker/daemon.json <<-'EOF'
> {
>   "registry-mirrors": ["https://wghlmi3i.mirror.aliyuncs.com"]
> }
> EOF
{
  "registry-mirrors": ["https://wghlmi3i.mirror.aliyuncs.com"]
}
[root@FantJ ~]# cat /etc/docker/daemon.json 
{
  "registry-mirrors": ["https://wghlmi3i.mirror.aliyuncs.com"]
}

其实就是添加了一个registry-mirrors的一个键值对。然后重加载该文件,重启服务

[root@FantJ ~]# systemctl daemon-reload
[root@FantJ ~]# systemctl restart docker
上一篇 下一篇

猜你喜欢

热点阅读