您现在的位置是:热点 >>正文
云计算核心技术Docker教程:Docker Hub构建钩子和源存储库
热点311501人已围观
简介...
Docker Hub允许您在钩子文件中或从自动构建界面(然后可以在钩子中引用)中定义构建环境变量。
在以下示例中,我云计们定义了一个构建钩子,该构建钩子使用docker build参数CUSTOM根据我们使用Docker Hub构建设置定义的算核变量的值来设置变量。$DOCKERFILE_PATH是一个变量,我们为其提供了要构建的Dockerfile$IMAGE_N心技AME的名称,并且是正在构建的映像的名称。
docker build --build-arg CUSTOM=$VAR -f术D $DOCKERFILE_PATH -t $IMAGE_NAME .
警告:hooks/build文件会覆盖构建器使用的基本dooccker build命令,因此您必须在挂钩中包含类似的构建命令,否则自动构建会失败。
推送到多个存储库
默认情况下,构ke建过程仅将映像推送到配置了构建设置的存储库。如果需要将同一映像推送到多个存储库,则可以设置一个post_push挂r教钩以添加其他标签并推送到更多存储库。
docker tag $IMAGE_NAME $DOCKER_REPO:$SOURCE_C程:OMMIT
docker push $DOCKER_REPO:$SOURCE_COMMIT
源存储库/分支克隆
当DockDoer Hub从源代码存储库中提取分支时,它将执行浅表克隆(仅指定分支的尖端)。这样做的好处是可以最大程度地减少从存储ck库中传输所需的数据量,并加快构建速度,因为它仅提取所需的最少代码。
因此,如果您需要执行依赖于其他分支(例如post_puersh钩子)的自定义操作,则除非执行以下操作之一,否则无法签出该分支:
通过执行以下操作,可以对目标分支进行浅层检出:
git f Hetch origin branch:mytargetbranch --depth 1
您还可以“取消整理”克隆,使用获取ub上的标志来获取整个Git历史记录(并可能花费很长时间/移动大量数据)--unshallow:
git fetch --构建unshallow origin
Tags:
相关文章
电子狗惨遭丢弃,戴上VR头显找到老友!Meta打出元宇宙感情牌
热点Meta打出了元宇宙的「感情牌」。 不得不说,是高手! 玩偶狗的元宇宙 近日,Meta的Quest 2推出了一支新的视频「Old Friends. New Fun」。 视频展示了,一支由动物机械玩偶组...
【热点】
阅读更多标签: 英飞凌 AI数据中心 电源解决方案 财报
热点云梦级11月13日云梦级消息,英飞凌科技股份公司今日公布了2025财年第四季度及2025全年财报(数据均截至2025年9月30日)。2025财年第四季度:营收为39.43亿欧元,利润为7.17亿欧元,...
【热点】
阅读更多北京查处首例AI虚假广告案:AI 冒充知名主持人卖鱼油
热点北京市场监管局通报了一起利用 AI 技术发布虚假广告的案件。这是北京市首次查处利用人工智能冒充知名主持人进行虚假宣传的行为。案件涉及一家企业,该公司通过 AI 技术剪辑央视知名主持人的视频,添加自创的...
【热点】
阅读更多
热门文章
最新文章
友情链接
- 标签: 康师傅
- https://www.springfieldlibrary.org/?s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,S7g
- https://www.parriscues.com/catalogsearch/result/?q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,Jwz
- https://www.rollingstone.it/?ID=DVMeu3AlmzZE1cuJ2FmgmO5TSCQRb3yh&s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,xkT
- https://www.teacherspayteachers.com/Browse/Price-Range/Free/Search:谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,8dw
- https://www.nctsn.org/search?cat=191&query=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,tCt
- https://www.urmc.rochester.edu/news/search?q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,XzL
- https://store.line.me/search/sticker/ja?q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】It5
- https://www.seforall.org/search?keywords=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,UMg
- https://www.seagrant.wisc.edu/?page=63&s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,0kq
- https://www.shacknews.com/editorial-search?q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,V7s
- https://www.swecobelgium.be/?page=9&s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,CEW
- https://www.le-trend.com/en/search/=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,7nK
- https://www.abbreviations.com/谷歌霸屏24小时见效-实现思路【tg:seogoogle987】Bxx
- https://www.mi.com/search?keyword=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,0f1
- https://www.remit.co.jp/vi/?s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】Op6
- https://www.rostaing.com/catalogsearch/result/?cat=22&q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,iLZ
- https://www.xvideos.com/tags/谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,TPO
- https://www.roberthalf.com/us/en/jobs/all/谷歌霸屏24小时见效-实现思路【tg:seogoogle987】5Eb
- https://store.line.me/search/sticker/ja?q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】IhY
- https://www.lechzuers.com/de/search?cat=163&q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,Neq
- https://www.lauben.com/de/?s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,MGh
- https://www.whirlpool.com.hk/chinese/catalogsearch/result?cat=30&q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,htD
- https://www.maafushidive.com?collections?vendors?q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,3bf
- https://www.quarterjacksurgery.co.uk/?AT=3rBy&s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,ve1
- https://www.partilerdunyasi.com/index.php?route=product/search&tag=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,12Y
- https://www.kelsa.co.uk/catalogsearch/result/index/?T=1686132119291&q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,BfS
- https://www.paspaley.com/catalogsearch/result/?action=QUERY&q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,M8j
- https://www.hanbat.ac.kr/search/front/Search.jsp?qt=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】Pax
- https://www.voices.com/talents/search?keywords=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,oc8
- https://www.reginatangoshoes.com/en/catalogsearch/result/index/?T=1686132113407&q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,KG1
- https://www.luxurysociety.com/en/search?q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,gNQ
- https://www.ussalabama.com/?action=CHECK&s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,0gZ
- https://www.lgnewsroom.com/search/谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,bG0
- https://www.qwant.com/?q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,FgW
- https://www.tailoy.com.pe/catalogsearch/result/?q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,3SY
- https://www.tarleton.edu/news/search/谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,bqt
- https://www.paxnet.co.kr/search/jongmok?kwd=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】0Bk
- https://www.teamlab.art/pt/?submit=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,xqN
- https://www.flickr.com/photos/tags/谷歌霸屏24小时见效-实现思路【tg:seogoogle987】Hul
- https://www.miamiopenmri.com/?action=CHECK&s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,UH3
- https://www.mdbg.net/chinese/dictionary?page=worddict&wdrst=0&wdqb=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,ybK
- https://www.wuv.edu/?s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,Z5a
- https://www.flickr.com/photos/tags/谷歌霸屏24小时见效-实现思路【tg:seogoogle987】uEN
- https://www.sic-info.org/vi/?s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,5uK
- https://www.tmtpost.com/search?q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,IJx
- https://www.teacherspayteachers.com/Browse/Search:谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,xdX
- https://www.remit.co.jp/zh/?s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,PlL
- https://www.wellbees.com/catalogsearch/result/?action=CHECK&q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,5xB
- https://www.whatsonstage.com/search?cat=64&term=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,E2G
- https://www.mingwai.edu.hk/?langzh-hant&s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,UKB