访问 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 信息
- [[email protected] 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: You're 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)
来源: http://www.bubuko.com/infodetail-3478695.html