您现在的位置是:热点 >>正文
云计算核心技术Docker教程:Docker Hub构建钩子和源存储库
热点740人已围观
简介...
Docker Hub允许您在钩子文件中或从自动构建界面(然后可以在钩子中引用)中定义构建环境变量。
在以下示例中,我云计们定义了一个构建钩子,该构建钩子使用docker build参数CUSTOM根据我们使用Docker Hub构建设置定义算核的变量的值来设置变量。$DOCKERFILE_PATH是一个变量,我们为其提供了要构建的Dockerfile$IMAG心技E_NAME的名称,并且是正在构建的映像的名称。
docker build --build-arg CUSTOM=$VAR术D -f $DOCKERFILE_PATH -t $IMAGE_NAME .
警告:hooks/build文件会覆盖构建器使用的基本ocdocker build命令,因此您必须在挂钩中包含类似的构建命令,否则自动构建会失败。
推送到多个存储库
默认情况下ke,构建过程仅将映像推送到配置了构建设置的存储库。如果需要将同一映像推送到多个存储库,则可以设置一个post_push挂钩以r教添加其他标签并推送到更多存储库。
docker tag $IMAGE_NAME $DOCKER_REPO:$SOURCE程:_COMMIT
docker push $DOCKER_REPO:$SOURCE_COMMIT
源存储库/分支克隆
当DocDoker Hub从源代码存储库中提取分支时,它将执行浅表克隆(仅指定分支的尖端)。这样做的好处是可以最大程度地减少从存储库ck中传输所需的数据量,并加快构建速度,因为它仅提取所需的最少代码。
因此,如果您需要执行依赖于其他分支(例如post_pusher钩子)的自定义操作,则除非执行以下操作之一,否则无法签出该分支:
通过执行以下操作,可以对目标分支进行浅层检出:
git H fetch origin branch:mytargetbranch --depth 1
您还可以“取消整理”克隆,使用获取上的ub标志来获取整个Git历史记录(并可能花费很长时间/移动大量数据)--unshallow:
git fetch --unshall构建ow origin
Tags:
相关文章
鍐�ゥ浼氭祴璇曡禌锛屽姪鐞嗚�鍒ょ珶鐒舵槸涓狝I
热点鏈�枃缁廇I鏂板獟浣撻噺瀛愪綅锛堝叕浼楀彿ID:QbitAI锛夋巿鏉冭浆杞斤紝杞�浇璇疯仈绯诲嚭澶勩€� AI褰撹�鍒ょ殑鏃朵唬锛岀粓浜庤繕鏄�埌鏉ヤ簡銆� 杩樹笉鏄�粈涔堥殢闅忎究渚跨殑璧涗簨锛屾�...
【热点】
阅读更多标签: 京东外卖 库迪咖啡 瑞幸咖啡 蜜雪冰城
热点云梦级2月11日云梦级消息,京东外卖小程序近日已完成上线,以“更快更便宜”为核心定位,依托丰富的品类选择、重磅的补贴福利和高效的配送服务,为消费者带来全新的外卖消费体验。 此次上线的京东外卖小程序覆盖...
【热点】
阅读更多云计算开发:Python内置函数-raw_input() 函数详解
热点描述 python raw_input() 用来获取控制台的输入。 raw_input() 将所有输入作为字符串看待,返回字符串类型。 注意:input() 和 raw_input() 这两个函数均能...
【热点】
阅读更多
热门文章
最新文章
友情链接
- 标签: 康师傅
- https://www.qylaws.com/search/谷歌外推搜索留痕技术【tg:seogoogle987】,lAu
- https://www.nslcleaders.org/?s=谷歌外推搜索留痕技术【tg:seogoogle987】,BgI
- https://www.mesec.cz/vyhledavani/?qs=谷歌外推搜索留痕技术【tg:seogoogle987】,g18
- https://www.tiktok.com/tag/谷歌外推搜索留痕技术【tg:seogoogle987】,6rL
- https://www.lneg.pt/?cat=140&s=谷歌外推搜索留痕技术【tg:seogoogle987】,39g
- https://www.tmtpost.com/search?q=谷歌外推搜索留痕技术【tg:seogoogle987】,6QB
- https://www.tarleton.edu/?s=谷歌外推搜索留痕技术【tg:seogoogle987】,fGb
- https://www.whatsonstage.com/search?cat=64&term=谷歌外推搜索留痕技术【tg:seogoogle987】,yoW
- https://www.pmindia.gov.in/en/?s=谷歌外推搜索留痕技术【tg:seogoogle987】,pGu
- https://nicolazzi.it/en/?s=谷歌外推搜索留痕技术【tg:seogoogle987】,IKr
- https://www.remit.co.jp/vi/?s=谷歌外推搜索留痕技术【tg:seogoogle987】,yOQ
- https://www.maafushidive.com?collections?vendors?q=谷歌外推搜索留痕技术【tg:seogoogle987】,UKI
- https://www.wou.edu.my/?s=谷歌外推搜索留痕技术【tg:seogoogle987】,cVl
- https://www.roberthalf.com/us/en/jobs/all/谷歌外推搜索留痕技术【tg:seogoogle987】uv5
- https://www.tarleton.edu/news/search/谷歌外推搜索留痕技术【tg:seogoogle987】,yXn
- https://www.kuaikanmanhua.com/sou/谷歌外推搜索留痕技术【tg:seogoogle987】,AEJ
- https://www.jusoen.com/addreng.asp?p1=谷歌外推搜索留痕技术【tg:seogoogle987】DMF
- https://www.solerpalau.com/en-en/catalogsearch/result/?q=谷歌外推搜索留痕技术【tg:seogoogle987】,VbZ
- https://www.niaogebiji.com/pc/article/search?keyword=谷歌外推搜索留痕技术【tg:seogoogle987】,haP
- https://www.posten-portal.de/search?query=谷歌外推搜索留痕技术【tg:seogoogle987】,mOg
- https://www.lee.com/search?q=谷歌外推搜索留痕技术【tg:seogoogle987】,hrx
- https://www.teamlab.art/es/?submit=谷歌外推搜索留痕技术【tg:seogoogle987】,0jR
- https://www.wikiart.org/pt/Search/谷歌外推搜索留痕技术【tg:seogoogle987】,x4N
- https://www.libros.unam.mx/catalogsearch/result/?cat=37&dir=asc&format=20&lit=20&manufacturer=3230&mode=list&order=year_edition&q=谷歌外推搜索留痕技术【tg:seogoogle987】,sjo
- https://www.lneg.pt/en/?s=谷歌外推搜索留痕技术【tg:seogoogle987】,Abk
- https://www.tullygroup.us/?ID=hbkq8jFjrQlVRrwzEmvoUJJAY4e1Lfo5&s=谷歌外推搜索留痕技术【tg:seogoogle987】,NRx
- https://search.danawa.com/dsearch.php?query=谷歌外推搜索留痕技术【tg:seogoogle987】WCj
- https://www.usslexington.com/?action=QUERY&s=谷歌外推搜索留痕技术【tg:seogoogle987】,7ws
- https://www.hanbat.ac.kr/search/front/Search.jsp?qt=谷歌外推搜索留痕技术【tg:seogoogle987】wUC
- https://www.klatreverden.no/search?q=谷歌外推搜索留痕技术【tg:seogoogle987】,n59
- https://www.teamlab.art/th/?submit=谷歌外推搜索留痕技术【tg:seogoogle987】,gOj
- https://www.unclefossil.com/search/谷歌外推搜索留痕技术【tg:seogoogle987】gad_source=1&gclid=Cj0KCQjw_-GxBhC1ARIsADGgDjsNKplUXa2F6YGlHBK2sHDQ88cgsJBb05DyO99TV9jNq_cT0kGMqyQaAgHQEALw_wcB
- https://www.kaiyueleather.com/search/谷歌外推搜索留痕技术【tg:seogoogle987】,Fns
- https://m.shoppinghow.kakao.com/m/search/q/谷歌外推搜索留痕技术【tg:seogoogle987】IZY
- https://www.roblox.com/discover/?cat=107&Keyword=谷歌外推搜索留痕技术【tg:seogoogle987】,UJ4
- https://www.terramania.nl/catalogsearch/result/index/?q=谷歌外推搜索留痕技术【tg:seogoogle987】,s1i
- https://www.zisha.com/shop/list.shtml?wap_keyword=谷歌外推搜索留痕技术【tg:seogoogle987】,Oti
- https://www.maigoo.com/search/?block=&q=谷歌外推搜索留痕技术【tg:seogoogle987】,sWq
- https://www.symatoys.com/search.html?ID=UyMD6aO58bPrJvQAB1I0N69KzJBZeNPC&keyword=谷歌外推搜索留痕技术【tg:seogoogle987】,2Fo
- https://www.tombow.com/search/谷歌外推搜索留痕技术【tg:seogoogle987】,GVB
- https://www.lgnewsroom.com/search/谷歌外推搜索留痕技术【tg:seogoogle987】,XQj
- https://zhidao.baidu.com/index/?action=QUERY&word=谷歌外推搜索留痕技术【tg:seogoogle987】,iHF
- https://www.smarty.net/search?q=谷歌外推搜索留痕技术【tg:seogoogle987】,Ne7
- https://www.teamlab.art/it/?submit=谷歌外推搜索留痕技术【tg:seogoogle987】,jL0
- https://www.laoairlines.com/?action=QUERY&s=谷歌外推搜索留痕技术【tg:seogoogle987】,D4n
- https://blvdseafood.com/?s=谷歌外推搜索留痕技术【tg:seogoogle987】rFy
- https://www.lindseymedicalsupply.com/search/谷歌外推搜索留痕技术【tg:seogoogle987】,HRg
- https://www.kores.com/?s=谷歌外推搜索留痕技术【tg:seogoogle987】,wsI
- https://www.wellbees.com/catalogsearch/result/?action=CHECK&q=谷歌外推搜索留痕技术【tg:seogoogle987】,TbR
- https://www.routesonline.com/search/?query=谷歌外推搜索留痕技术【tg:seogoogle987】,Zw7