将docker镜像仓库源设置为国内加速源

2024年8月10日更新,新增其它加速源
2024年7月9日更新,国内全部源失效,建议使用docker.m.daocloud.io,此加速源为白名单模式,只能同步在白名单内的镜像,详细见:https://github.com/DaoCloud/public-image-mirror?tab=readme-ov-file
2023年6月27日更新 中科大docker镜像加速源https://docker.mirrors.ustc.edu.cn/已经被废弃,推荐使用163的docker hub加速源

1.创建daemon.json文件

sudo touch /etc/docker/daemon.json

2.在daemon文件中增加如下内容

{
    "registry-mirrors": [
        "https://dh-mirror.gitverse.ru",
        "https://dockerhub1.beget.com",
        "https://noohub.ru",
        "https://docker.m.daocloud.io"
    ]
}

3.重启Docker

sudo systemctl restart docker

4.查看Docker信息

  • 查看详细信息
root@node01:~# docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)

Server:
 Containers: 1
  Running: 0
  Paused: 0
  Stopped: 1
 Images: 8
 Server Version: 20.10.3
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc io.containerd.runc.v2 io.containerd.runtime.v1.linux
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc version: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 5.4.0-66-generic
 Operating System: Ubuntu 20.04.2 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 1
 Total Memory: 1.913GiB
 Name: node01
 ID: UJKF:FGCM:V7ZK:ZCHV:TGE3:SWAL:FAVC:WMIE:XO5Q:EPE2:AHS3:IGMD
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Registry Mirrors:
  https://dh-mirror.gitverse.ru/
  https://dockerhub1.beget.com/
  https://noohub.ru/
  https://docker.m.daocloud.io/
 Live Restore Enabled: false

WARNING: No swap limit support
WARNING: No blkio weight support
WARNING: No blkio weight_device support
posted @   二乘八是十六  阅读(1071)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
点击右上角即可分享
微信分享提示