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

    1、简介               

        为什么使用阿里云镜像加速器?

                   通常在国内使用Docker,是需要从Docker官网去拉取镜像的,但是官网是在国外的, 所以下载非常慢,或者都下载不了,总是报timeout连接失败错误,因此需要配置镜像的下载,

                  这个是docker操作首先要做的事情,通常使用以下两种方式。

    2、、登录 阿里云 

    https://promotion.aliyun.com

    注册或使用 淘宝账号登录

    3、主机上 创建 文件 vi /etc/docker/daemon.json

    黏贴下内容

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

    4、重启 docker

    daemon-reload
    restart docker

    5、验证 加速器地址释放修改 

     docker info

     6、执行 hello-world

    docker run hello-world
    docker run hello-world
    Unable to find image 'hello-world:latest' locally # 本地没有 hello-world 镜像,需要到阿里云镜像下载
    latest: Pulling from library/hello-world
    0e03bdcc26d7: Pull complete 
    Digest: sha256:6a65f928fb91fcfbc963f7aa6d57c8eeb426ad9a20c7ee045538ef34847f44f1
    Status: Downloaded newer image for hello-world:latest
    
    Hello from Docker!
    This message shows that your installation appears to be working correctly.
    
    To generate this message, Docker took the following steps:
     1. The Docker client contacted the Docker daemon.
     2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
        (amd64)
     3. The Docker daemon created a new container from that image which runs the
        executable that produces the output you are currently reading.
     4. The Docker daemon streamed that output to the Docker client, which sent it
        to your terminal.
    
    To try something more ambitious, you can run an Ubuntu container with:
     $ docker run -it ubuntu bash
    
    Share images, automate workflows, and more with a free Docker ID:
     https://hub.docker.com/
    
    For more examples and ideas, visit:
     https://docs.docker.com/get-started/

    7 、docker 执行流程

     

  • 相关阅读:
    移动桌面文件
    软件项目经理素质能力的必备要求
    如何管理时间
    《明日歌》
    浏览网页出现iexplore.exe应用程序错误为:"0x03e620b0"指令引用的"0x00000000"内存.该内存不能为"read"?
    css网站布局学习笔记
    因为爱,人生除了理智,还有情感!
    35岁之前成功的12条黄金法则
    VS2005中没有DataGrid控件的解决方案
    先装VS2005再装IIS,出现访问IIS元数据库失败解决方案
  • 原文地址:https://www.cnblogs.com/wdh01/p/12913973.html
Copyright © 2011-2022 走看看