Skip to content

Instantly share code, notes, and snippets.

@pythonzm
Forked from qwfys/202005281327.md
Created November 9, 2021 06:39

Revisions

  1. @qwfys qwfys revised this gist May 28, 2020. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions 202005281327.md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,9 @@
    - google镜像仓库

      [https://gcr.io/google-containers/](https://gcr.io/google-containers/)

      [https://gcr.io/kubernetes-helm/](https://gcr.io/kubernetes-helm/)

      [https://gcr.io/google-containers/pause](https://gcr.io/google-containers/pause)

    - [coreos镜像仓库](https://quay.io/repository/)
  2. @qwfys qwfys revised this gist May 28, 2020. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion 202005281327.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,3 @@
    @[toc](国内拉取google kubernetes镜像)

    # 常用镜像仓库
    - [DockerHub镜像仓库](https://hub.docker.com/)
  3. @qwfys qwfys revised this gist May 28, 2020. 1 changed file with 118 additions and 27 deletions.
    145 changes: 118 additions & 27 deletions 202005281327.md
    Original file line number Diff line number Diff line change
    @@ -1,51 +1,142 @@
    常用镜像仓库
    DockerHub镜像仓库:
    https://hub.docker.com/
    @[toc](国内拉取google kubernetes镜像)

    google镜像仓库:
    https://gcr.io/google-containers/
    https://gcr.io/kubernetes-helm/
    https://gcr.io/google-containers/pause
    # 常用镜像仓库
    - [DockerHub镜像仓库](https://hub.docker.com/)

    coreos镜像仓库:
    https://quay.io/repository/
    - google镜像仓库

    elastic镜像仓库:
    https://www.docker.elastic.co/
      [https://gcr.io/google-containers/](https://gcr.io/google-containers/)
      [https://gcr.io/kubernetes-helm/](https://gcr.io/kubernetes-helm/)
      [https://gcr.io/google-containers/pause](https://gcr.io/google-containers/pause)

    RedHat镜像仓库:
    https://access.redhat.com/containers
    - [coreos镜像仓库](https://quay.io/repository/)

    阿里云镜像仓库:
    https://cr.console.aliyun.com
    - [elastic镜像仓库](https://www.docker.elastic.co/)

    华为云镜像仓库:
    https://console.huaweicloud.com/swr
    - [RedHat镜像仓库](https://access.redhat.com/containers/)

    国内镜像源
    部分国外镜像仓库无法访问,但国内有对应镜像源,可以从以下镜像源拉取到本地然后重改tag即可:
    阿里云镜像仓库
    - [阿里云镜像仓库](https://cr.console.aliyun.com)

    可以拉取k8s.gcr.io镜像
    ```

    - [华为云镜像仓库](https://console.huaweicloud.com/swr/)

    # 国内镜像源

      部分国外镜像仓库无法访问,但国内有对应镜像源,可以从以下镜像源拉取到本地然后重改tag即可:

    - 阿里云镜像仓库

      可以拉取k8s.gcr.io镜像

    ```basj
    #示例
    docker pull k8s.gcr.io/pause:3.2
    #改为
    docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.2
    ```

    dockerhub镜像仓库
    - dockerhub镜像仓库

      可以拉取k8s.gcr.io镜像

    ```bash
    #示例
    docker pull k8s.gcr.io/pause:3.1
    docker pull k8s.gcr.io/kube-apiserver:v1.17.3

    #改为
    docker pull googlecontainersmirrors/pause:3.1
    docker pull googlecontainersmirrors/kube-apiserver:v1.17.3

    ```

    - 七牛云镜像仓库

      可以拉取k8s.gcr.io镜像

    ```bash
    #示例
    docker pull quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.30.0

    #改为
    docker pull quay-mirror.qiniu.com/kubernetes-ingress-controller/nginx-ingress-controller:0.30.0

    ```



    - Docker hub搜索镜像

      很多国外镜像已经有热心网友传到了dockerhub,例如gcr.io/kubernetes-helm/tiller:v2.16.5这个镜像,直接搜索关键字,找到排序靠前的然后在dockerhub确认并拉取即可:

    ```bash
    # docker search tiller
    NAME DESCRIPTION STARS OFFICIAL AUTOMATED
    jessestuart/tiller Nightly multi-architecture (amd64, arm64, ar 19 [OK]
    sapcc/tiller Mirror of https://gcr.io/kubernetes-helm/til 9
    ist0ne/tiller https://gcr.io/kubernetes-helm/tiller ....

    ```
    ![](https://img-blog.csdnimg.cn/20200410105004992.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L25ldHdvcmtlbg==,size_16,color_FFFFFF,t_70)
    可以拉取k8s.gcr.io镜像
    # dockerhub镜像国内加速
    - [阿里云镜像加速](https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors/)
    ```bash
    sudo mkdir -p /etc/docker
    tee /etc/docker/daemon.json <<-'EOF'
    {
    "registry-mirrors": ["https://uyah70su.mirror.aliyuncs.com"]
    }
    EOF
    ```
    - [daocloud dockerhub镜像加速](https://www.daocloud.io/mirror/)
    ```bash
    curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://f1361db2.m.daocloud.io
    ```
    - [西北农林大学dockerhub镜像加速](https://mirrors.nwafu.edu.cn/help/reverse-proxy/dockerhub)
    ```bash
    sudo mkdir -p /etc/docker
    tee /etc/docker/daemon.json <<-'EOF'
    {
    "registry-mirrors": ["https://dockerhub.mirrors.nwafu.edu.cn/"]
    }
    EOF
    ```
    - [华为云dockerhub镜像加速](https://console.huaweicloud.com/swr/)
    ```bash
    sudo mkdir -p /etc/docker
    sudo tee /etc/docker/daemon.json <<- 'EOF'
    {
    "registry-mirrors": ["https://7bafc985f90c43b887a96c2b846cf984.mirror.swr.myhuaweicloud.com"]
    }
    EOF
    ```
    然后重新启动 Docker 服务:
    ```bash
    sudo systemctl daemon-reload && sudo systemctl restart docker
    ```
    验证加速器是否生效
    执行 $ docker info,如果从结果中看到了如下内容,说明配置成功。
    ```bash
    $ docker info | grep Mirrors -A1
    Registry Mirrors:
    https://uyah70su.mirror.aliyuncs.com/

    #验证镜像拉取速度
    $ time docker pull centos
    ```
    ————————————————
    版权声明:本文为CSDN博主「willblog」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/networken/article/details/84571373
    >特别说明
    >&emsp;&emsp;本文转载自[CSDN博客-国内拉取google kubernetes镜像](https://blog.csdn.net/networken/article/details/84571373),支持原创请稳步原博客。
  4. @qwfys qwfys renamed this gist May 28, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. @qwfys qwfys created this gist May 28, 2020.
    51 changes: 51 additions & 0 deletions 202005281327.gist
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,51 @@
    常用镜像仓库
    DockerHub镜像仓库:
    https://hub.docker.com/

    google镜像仓库:
    https://gcr.io/google-containers/
    https://gcr.io/kubernetes-helm/
    https://gcr.io/google-containers/pause

    coreos镜像仓库:
    https://quay.io/repository/

    elastic镜像仓库:
    https://www.docker.elastic.co/

    RedHat镜像仓库:
    https://access.redhat.com/containers

    阿里云镜像仓库:
    https://cr.console.aliyun.com

    华为云镜像仓库:
    https://console.huaweicloud.com/swr

    国内镜像源
    部分国外镜像仓库无法访问,但国内有对应镜像源,可以从以下镜像源拉取到本地然后重改tag即可:
    阿里云镜像仓库

    可以拉取k8s.gcr.io镜像
    ```
    #示例
    docker pull k8s.gcr.io/pause:3.2

    #改为
    docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.2
    ```

    dockerhub镜像仓库

    可以拉取k8s.gcr.io镜像








    ————————————————
    版权声明:本文为CSDN博主「willblog」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/networken/article/details/84571373