Docker Hub自动构建依赖于另一个Docker Hub仓库 [英] Docker hub automated build depend on another docker hub repo
问题描述
我知道该过程以及如何从GitHub或BitBucket配置自动化Docker集线器.
I know the procedure and also how to configure an automated docker hub from GitHub or BitBucket.
但是我现在要做的是创建两个名为 Test/main
和 Test/depend
的docker hub库.
But what I have to do right now is to create two docker hub repositories called Test/main
and Test/depend
.
第一个存储库 Test/main
与GitHub连接,只要有新的推送,图像就会自动生成.但是,只要测试/主存储库发生更改,我想触发另一个存储库 Test/depend
.
The first repository Test/main
is connected with GitHub and whenever there is a new push the image will be automatically build. But I want to trigger another repository Test/depend
whenever there is a change on the Test/main repository.
是否可以配置这种情况?
Is it possible to configure such scenario?
推荐答案
这可以通过DockerHub完成:
This can be done with DockerHub:
您需要转到 Test/depend
的 build settings
,然后查找 Repository Links 部分.它说:
You need to go to the build settings
of Test/depend
, and look for the section Repository Links. It says:
将您的自动构建链接到另一个Docker Hub存储库,以及何时该存储库已更新,它将自动触发对此自动构建.
Link your Automated Build to another Docker Hub repository, and when that repository is updated, it will automatically trigger a rebuild of this Automated Build.
因此,您只需在要包装的盒子中添加 Test/main
即可!
So you just have to add Test/main
int the box an you good to go!
这篇关于Docker Hub自动构建依赖于另一个Docker Hub仓库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!