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 执行流程

     

  • 相关阅读:
    JAVA中添加jar包
    shell 脚本读取数据库示例
    Div 布局之 DIV垂直居中显示
    awk 学习笔记
    提示ufmyhr日志已满,无法继续操作软件,如何解决
    12种貌似卫生的不卫生习惯
    远程通客户端反复提示要下载客户端软件
    固定资产反启用后再启用报00:00:00错误
    2008年5月14日
    睡前六个必要动作,一觉睡到大天亮
  • 原文地址:https://www.cnblogs.com/wdh01/p/12913973.html
Copyright © 2011-2022 走看看