• centos7配置Docker镜像加速器


    创建并编辑文件

    [root@localhost ~]# cd /etc/docker/
    [root@localhost docker]#
    [root@localhost docker]# ls
    key.json
    [root@localhost docker]#

    # vi daemon.json

    [root@localhost docker]# pwd
    /etc/docker
    [root@localhost docker]#
    [root@localhost docker]# cat daemon.json
    {
      "registry-mirrors": ["https://hub.daocloud.io"]
    }

    或者

    https://almtd3fa.mirror.aliyuncs.com为阿里云的加速地址。修改后,重启docker

    {
      "registry-mirrors": ["https://almtd3fa.mirror.aliyuncs.com"]
    }

    重启服务

    # systemctl daemon-reload

    # systemctl restart docker.service

    验证:
    # docker info

    [root@localhost docker]# docker info
    Client:
     Debug Mode: false
    
    Server:
     Containers: 0
      Running: 0
      Paused: 0
      Stopped: 0
     Images: 0
     Server Version: 19.03.1
     Storage Driver: overlay2
      Backing Filesystem: xfs
      Supports d_type: true
      Native Overlay Diff: true
     Logging Driver: json-file
     Cgroup Driver: cgroupfs
     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
     Default Runtime: runc
     Init Binary: docker-init
     containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
     runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f
     init version: fec3683
     Security Options:
      seccomp
       Profile: default
     Kernel Version: 3.10.0-862.el7.x86_64
     Operating System: CentOS Linux 7 (Core)
     OSType: linux
     Architecture: x86_64
     CPUs: 8
     Total Memory: 31.26GiB
     Name: localhost.localdomain
     ID: PWEZ:N4ZR:KMJC:EGZ7:EAPB:MU7P:OA5U:42IT:3HI3:7QU6:WL2J:FKKT
     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://hub.daocloud.io/
     Live Restore Enabled: false

    参考文章:

    CoreOS配置Docker镜像加速器更靠谱的方法

    https://yq.aliyun.com/articles/622254?spm=5176.10695662.1996646101.searchclickresult.39e63908A9XO6Z

    Docker 镜像加速器

    https://yq.aliyun.com/articles/29941?spm=5176.10695662.1996646101.searchclickresult.39e63908A9XO6Z

  • 相关阅读:
    打赏
    996315便捷扫码接口的使用方法
    openjdk ImageIO.write()时出现Invalid argument to native writeImage
    CentOS7通过rpm包升级openssh8.8
    python docx转pdf
    python生成币私钥公钥
    二叉树的非递归后序遍历算法
    STM32引脚做输入时,有开漏,浮空输入,弱上拉,弱下拉,等多种方式,如何选择????
    TLC2551驱动问题
    connot launth the modelsimaltera softwarre because you did not specify the path to the executables of the modelsimaltera softwarre
  • 原文地址:https://www.cnblogs.com/djlsunshine/p/11375323.html
Copyright © 2020-2023  润新知