zoukankan      html  css  js  c++  java
  • docker加速配置阿里云镜像

    Docker加速器
    使用Docker官方获取镜像,由于网络原因,拉取镜像的过程非常慢,通过配置docker加速器提升了国内网络访问Docker Hub的速度;

    docker环境已安装

    从DaoCloud获取,同样可以选择阿里云等获取;
    [root@GaoServer docker]# curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://cd841f18.m.daocloud.io
    docker version >= 1.12
    {"registry-mirrors": ["http://cd841f18.m.daocloud.io"],}
    Success.
    You need to restart docker to take effect: sudo systemctl restart docker
    [root@GaoServer docker]# systemctl daemon-reload
    [root@GaoServer docker]# systemctl restart docker
    Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
    [root@GaoServer docker]# cat daemon.json
    {"registry-mirrors": ["http://cd841f18.m.daocloud.io"],}
    [root@GaoServer ~]# docker --version
    Docker version 1.13.1, build 774336d/1.13.1

    创建或修改 /etc/docker/daemon.json 文件,修改为如下形式 (请将 加速地址 替换为在加速器页面获取的专属地址)
    [root@GaoServer docker]# vim daemon.json
    {
    "registry-mirrors": [
    "http://cd841f18.m.daocloud.io"
    ],
    "insecure-registries": []
    [root@GaoServer docker]# systemctl daemon-reload
    [root@GaoServer docker]# systemctl restart docker
    [root@GaoServer docker]# docker pull docker.io/centos
    Using default tag: latest
    Trying to pull repository docker.io/library/centos ...
    latest: Pulling from docker.io/library/centos
    469cfcc7a4b3: Pull complete
    Digest: sha256:4b63b3e9fe127c07a15458af7fcc187980a9fff8069063057bbc9c282f26f539
    Status: Downloaded newer image for docker.io/centos:latest
    [root@GaoServer docker]# docker images
    REPOSITORY TAG IMAGE ID CREATED SIZE
    docker.io/centos latest e934aafc2206 2 days ago 199 MB

    快,滋醒这个做梦的人,有糖尿病的往后靠靠哈,不要给他点甜头!
  • 相关阅读:
    Android Studio中的Java控制台中出现乱码问题?
    博客第二天——头插法建立单链表
    博客志第一天——判断一个整数N是否是完全平方数?
    绝对定位篇
    JavaScript 事件循环
    var与let变量for遍历的问题
    获取url中参数值
    Js不用for,forEach,map等循环实现九九乘法表
    前端常见浏览器兼容性问题
    js常见面试题
  • 原文地址:https://www.cnblogs.com/jianzhaojing/p/13336545.html
Copyright © 2011-2022 走看看