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

    快,滋醒这个做梦的人,有糖尿病的往后靠靠哈,不要给他点甜头!
  • 相关阅读:
    hibernate根据hbm自动生成数据库
    java中最常用jar包的用途说明,适合初学者
    struts json配置中遇到的问题记录
    使用NHibernate, Oracle Clob/NClob无法插入
    几种常用的JS类定义方法
    linux系统安装nginx
    Hibernate动态条件查询(Criteria Query)
    ashx中使用session存储数据时报异常
    Nhibernate查询语句
    Hibernate3动态条件查询
  • 原文地址:https://www.cnblogs.com/jianzhaojing/p/13336545.html
Copyright © 2011-2022 走看看