Docker配置阿里云镜像加速

Posted lua123

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Docker配置阿里云镜像加速相关的知识,希望对你有一定的参考价值。

访问 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配置阿里云镜像加速的主要内容,如果未能解决你的问题,请参考以下文章

docker-阿里云镜像加速配置

CentOS7 配置Docker 阿里云镜像加速

docker配置阿里云镜像加速

docker配置阿里云镜像加速

Docker-镜像源加速配置

Docker配置阿里云镜像加速