File tree Expand file tree Collapse file tree 3 files changed +20
-14
lines changed Expand file tree Collapse file tree 3 files changed +20
-14
lines changed Original file line number Diff line number Diff line change 7878 if : steps.check_body.outputs.is_image_format == 'true'
7979 id : syncImage
8080 env :
81+ DOCKERHUB_USER : ${{ vars.DOCKERHUB_USER }}
82+ DOCKERHUB_PASSWORD : ${{ secrets.DOCKERHUB_PASSWORD }}
8183 TARGET_REGISTRY_PASSWORD : ${{ secrets.TARGET_REGISTRY_PASSWORD }}
8284 TARGET_REGISTRY_USER : ${{ vars.TARGET_REGISTRY_USER }}
8385 # TARGET_REGISTRY: index.docker.io
Original file line number Diff line number Diff line change 2323![ image] ( https://github.com/imdingtalk/image-mirror/assets/16778873/a83b8765-3bd1-4391-afb3-cd8d4bc4718d )
2424![ image] ( https://github.com/imdingtalk/image-mirror/assets/16778873/b4623fca-43c2-4f55-bfb1-cef2e949fb93 )
2525比如我们要同步一个外部镜像到` registry.cn-hangzhou.aliyuncs.com/imdingtalk/kube-apiserver:v1.27.12 `
26- 需要设置一些变量
2726
28- - ** TARGET_NAMESPACE:** 目标` NAMESPACE ` ,该例子中应该设置为` imdingtalk `
29- - ** TARGET_REGISTRY:** 目标仓库,该例子中应该设置为` registry.cn-hangzhou.aliyuncs.com `
30- - ** TARGET_REGISTRY_USER:** 目标仓库的用户名
31- - ** TARGET_REGISTRY_PASSWORD:** 目标仓库的密码
27+ 需要设置一些变量 ` variables `
28+ - ** DOCKERHUB_USER:** 如果源仓库是dockerhub,即使公开仓库,也是需要鉴权信息,填写` dockehub ` 用户名
29+ - ** TARGET_NAMESPACE:** 目标` NAMESPACE ` ,该例子中应该设置为` imdingtalk `
30+ - ** TARGET_REGISTRY:** 目标仓库,该例子中应该设置为` registry.cn-hangzhou.aliyuncs.com `
31+ - ** TARGET_REGISTRY_USER:** 目标仓库的用户名
32+ 一些` secrets `
33+ - ** DOCKERHUB_PASSWORD:** 如果源仓库是dockerhub,即使公开仓库,也是需要鉴权信息,填写` dockehub ` 密码
34+ - ** TARGET_REGISTRY_PASSWORD:** 目标仓库的密码
35+
3236该例子中,需要确保使用目标仓库的用户名和密码,使用命令 ` docker login registry.cn-hangzhou.aliyuncs.com ` 能够成功登录
33374 . 按照直接使用的方式在自己的仓库提交issue
3438
Original file line number Diff line number Diff line change 11index.docker.io :
2- username : $TARGET_REGISTRY_USER
3- password : $TARGET_REGISTRY_PASSWORD
2+ username : $DOCKERHUB_USER
3+ password : $DOCKERHUB_PASSWORD
4+ docker.io :
5+ username : $DOCKERHUB_USER
6+ password : $DOCKERHUB_PASSWORD
47registry-1.docker.io :
5- username : $TARGET_REGISTRY_USER
6- password : $TARGET_REGISTRY_PASSWORD
8+ username : $DOCKERHUB_USER
9+ password : $DOCKERHUB_PASSWORD
710registry.hub.docker.com :
8- username : $TARGET_REGISTRY_USER
9- password : $TARGET_REGISTRY_PASSWORD
10- docker.io :
11- username : $TARGET_REGISTRY_USER
12- password : $TARGET_REGISTRY_PASSWORD
11+ username : $DOCKERHUB_USER
12+ password : $DOCKERHUB_PASSWORD
1313registry.cn-hangzhou.aliyuncs.com :
1414 username : $TARGET_REGISTRY_USER
1515 password : $TARGET_REGISTRY_PASSWORD
You can’t perform that action at this time.
0 commit comments