当前位置:   article > 正文

阿里云同步gcr.io的镜像_使用阿里云同步gcr镜像

使用阿里云同步gcr镜像

一、注册GitHub账户

地址:GitHub: Where the world builds software · GitHub

二、在github中创建仓库

 

三、在仓库中创建文件夹,并创建dockerfile

 注意:输入创建文件ingress-nginx-controller后在输入/,创建一个文件dockerfile

From k8s.gcr.io/ingress-nginx/controller:v1.1.1

四、注册阿里云账号并登录,打开控制台进入到容器镜像服务

五、创建命名空间

六、创建镜像仓库

七、关联刚刚注册的GitHub账号和仓库

注意:需要勾选海外机器构建

八、添加构建规则

上下文目录就是GitHub中创建的文件夹

Dockerfile路径就是文件夹中创建的文件

九、点击立即构建

十、查看日志是否构建成功

十一、测试拉取镜像

  1. [root@ls_rflrhksm ~]# docker login --username=lixin0608 registry.cn-hangzhou.aliyuncs.com
  2. Password:
  3. WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
  4. Configure a credential helper to remove this warning. See
  5. https://docs.docker.com/engine/reference/commandline/login/#credentials-store
  6. Login Succeeded
  7. [root@k8s-master01 ingress-nginx]# docker pull registry.cn-hangzhou.aliyuncs.com/lixin-c/controller:v1.1.2
  8. v1.1.2: Pulling from lixin-c/controller
  9. a0d0a0d46f8b: Pull complete
  10. 3aae86482564: Pull complete
  11. c0d03781abb3: Pull complete
  12. 0297e2ef8f7f: Pull complete
  13. 866a68ce3c13: Pull complete
  14. 1c2a7ca65b54: Pull complete
  15. 41fd2de30e46: Pull complete
  16. 637f10464e4d: Pull complete
  17. 998064a16da4: Pull complete
  18. e63d23220e8c: Pull complete
  19. 8128610547fb: Pull complete
  20. ae07a1a7f038: Pull complete
  21. ceb23c4cb607: Pull complete
  22. Digest: sha256:628cc0d4023eaf9bd7de0cab60a6f9aeb447d3aaa2bb78670604baae94879cef
  23. Status: Downloaded newer image for registry.cn-hangzhou.aliyuncs.com/lixin-c/controller:v1.1.2
  24. registry.cn-hangzhou.aliyuncs.com/lixin-c/controller:v1.1.2
  25. [root@k8s-master01 ingress-nginx]# docker images | grep controller
  26. registry.cn-hangzhou.aliyuncs.com/lixin-c/controller v1.1.2 7e5c1cecb086 4 months ago 286MB

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/喵喵爱编程/article/detail/774773
推荐阅读
相关标签
  

闽ICP备14008679号