码迷,mamicode.com
首页 > 其他好文 > 详细

Docker配置阿里云镜像加速

时间:2019-08-23 19:24:04      阅读:91      评论:0      收藏:0      [点我收藏+]

标签:deb   方法   you   vol   stop   ota   nbsp   span   work   

访问 https://help.aliyun.com/document_detail/60750.html

技术图片

点击进入控制台

技术图片

前往开通

技术图片

设置密码

技术图片

确定,进来后,点击镜像加速器

技术图片

就冒出来配置方法,很简单的,就是拿到加速地址,然后去搞个json文件即可。

vim /etc/docker/daemon.json

# 添加如下内容,具体地址自己申请咯
{
  "registry-mirrors": ["https://****.mirror.aliyuncs.com"]
}

# 重启服务
systemctl daemon-reload
systemctl restart docker

这个时候查看docker信息

[root@localhost admin]# docker info
Containers: 5
 Running: 0
 Paused: 0
 Stopped: 5
Images: 5
Server Version: 1.13.1
Storage Driver: overlay2
 Backing Filesystem: xfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: journald
Cgroup Driver: systemd
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: docker-runc runc
Default Runtime: docker-runc
Init Binary: /usr/libexec/docker/docker-init-current
containerd version:  (expected: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1)
runc version: 5eda6f6fd0c2884c2c8e78a6e7119e8d0ecedb77 (expected: 9df8b306d01f59d3a8029be411de015b7304dd8f)
init version: fec3683b971d9c3ef73f284f176672c44b448662 (expected: 949e6facb77383876aeff8a6944dde66b3089574)
Security Options:
 seccomp
  WARNING: Youre not using the default seccomp profile
  Profile: /etc/docker/seccomp.json
 selinux
Kernel Version: 3.10.0-862.9.1.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 3
CPUs: 1
Total Memory: 974.6 MiB
Name: localhost.localdomain
ID: RKLD:HVRZ:AAX6:O36J:264Q:QAF6:EHO6:2VCI:AA3M:445E:266Y:KCKU
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Registry Mirrors:
 https://****.mirror.aliyuncs.com
Live Restore Enabled: false
Registries: docker.io (secure)

 

Docker配置阿里云镜像加速

标签:deb   方法   you   vol   stop   ota   nbsp   span   work   

原文地址:https://www.cnblogs.com/LUA123/p/11401962.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!