阿里云同步gcr.io的镜像

一、注册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路径就是文件夹中创建的文件

九、点击立即构建

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

十一、测试拉取镜像

[root@ls_rflrhksm ~]# docker login --username=lixin0608 registry.cn-hangzhou.aliyuncs.com
Password: 
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
[root@k8s-master01 ingress-nginx]# docker pull registry.cn-hangzhou.aliyuncs.com/lixin-c/controller:v1.1.2
v1.1.2: Pulling from lixin-c/controller
a0d0a0d46f8b: Pull complete 
3aae86482564: Pull complete 
c0d03781abb3: Pull complete 
0297e2ef8f7f: Pull complete 
866a68ce3c13: Pull complete 
1c2a7ca65b54: Pull complete 
41fd2de30e46: Pull complete 
637f10464e4d: Pull complete 
998064a16da4: Pull complete 
e63d23220e8c: Pull complete 
8128610547fb: Pull complete 
ae07a1a7f038: Pull complete 
ceb23c4cb607: Pull complete 
Digest: sha256:628cc0d4023eaf9bd7de0cab60a6f9aeb447d3aaa2bb78670604baae94879cef
Status: Downloaded newer image for registry.cn-hangzhou.aliyuncs.com/lixin-c/controller:v1.1.2
registry.cn-hangzhou.aliyuncs.com/lixin-c/controller:v1.1.2

[root@k8s-master01 ingress-nginx]# docker images | grep controller
registry.cn-hangzhou.aliyuncs.com/lixin-c/controller          v1.1.2    7e5c1cecb086   4 months ago    286MB

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值