zoukankan      html  css  js  c++  java
  • docker~使用阿里加速器

    回到目录

    国外的docker hub速度慢这是公认的,而我们可以使用阿里提供的加速器,管理你的镜像,拉别人的镜像等等.

    1. 注册一个阿里的账号
    2. 进行加速器页面https://cr.console.aliyun.com/#/accelerator
    3. 复制你的加入器URL
    4. 将加速参数添加到docker启动项
      echo "DOCKER_OPTS="$DOCKER_OPTS --registry-mirror=你的加速地址"" | sudo
      tee -a /etc/default/docker
      sudo service docker restart
    5. 也可以将加速器地址写到配置文件里,然后重启服务即可
      sudo mkdir -p /etc/docker
      sudo tee /etc/docker/daemon.json <<-'EOF'
      {
        "registry-mirrors": ["https://d8b3zdiw.mirror.aliyuncs.com"]
      }
      EOF
      sudo systemctl daemon-reload
      sudo systemctl restart docker
    6. 如果客户端docker版本低,也可以去升级一下
      curl -sSL http://acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/internet | sh -
    7. 可以在阿里网页上搜索你需要的镜像,https://cr.console.aliyun.com/#/imageSearch
    8. 点击详情,可以看到镜像相关信息,和如何拉取你的镜像
    9. 建立自己的仓库之后,可以push和pull自己的镜像了


    感谢各位的阅读,我们对docker的研究还在继续!

     回到目录

  • 相关阅读:
    flv mime IIS设置
    正则表达式
    MATLAB out of memory
    Cyclic prefix
    Windows Live Writer Test
    zz排序算法的稳定性
    MATLAB的分数和小数
    young矩阵学习
    Python初体验(二)
    利用VS2010调用Excel的宏
  • 原文地址:https://www.cnblogs.com/lori/p/7168973.html
Copyright © 2011-2022 走看看