您现在的位置是:热点 >>正文
云计算核心技术Docker教程:docker-compose指定自定义网络
热点27073466人已围观
简介...
docker-compose不仅可以使用默认的应用程序网络,还可以使用顶级networks密钥指定自己的网络。这使您可以创建更复杂的拓扑并指定自定义网络驱动程序和选项。您还可以使用它将服务连接到不受Compose管理的外部创建的网络。
每个服务都可以使用服务级云计别 networks密钥指定要连接的网络,该服务级别密钥是引用顶级 networks密钥下条目的名称的列表。
这是一个示例Compose文件,定义了两个自定义网络。该proxy服务与该服务是隔离的db,因为它们不共享公共网络-只能app与两者通信。
version: "算核3"
services:
proxy:
build: ./proxy
&nb心技sp; networks:
- frontend
a术Dpp:
build: ./app
networks:
oc - frontend
- backend
 ke;db:
image: postgres
networks:
&nbsr教p; - backend
networks:
frontend:
# Use a cu程:stom driver
driver: custom-driver-1
backend:
 do; # Use a custom driver which takes special options
driver: custom-driver-2
&nbsckp; driver_opts:
foo: "1"
 er; bar: "2"
通过为每个连接的网络设置ipv4_address和/或ipv6_address,可以为网络配置静态IP地址。
也可以为网络指定一个自定义名称(从3.5版开始):
version: "3.5"
networks:
-c frontend:
name: custom_frontend
&nbsomp; driver: custom-driver-1
Tags:
相关文章
标签: 腾讯云 Agent全景图 混元大模型 TokenHub
热点云梦级3月27日云梦级消息,今天,腾讯云正式对外发布Agent产品全景图,打造面向Agent时代的全栈 AI 引擎。 底座层:提供动力 图纸的最下方,那束喷射的蓝色火焰,是整个车间的动力源泉——AI...
【热点】
阅读更多亚马逊裁员 1.4 万,AI 与自动化迅速崛起
热点近日,亚马逊高级副总裁 Beth Galetti 在一封内部信中确认,公司将裁减约1.4万名全职员工,这一人数占其35万名员工的4%。此次裁员是亚马逊在实施 “大规模裁员计划” 中迈出的重要一步,主要...
【热点】
阅读更多AI 市场有望在 2024 年突破 5000 亿美元大关
热点国际数据公司 IDC 最新发布的一份全球半年度人工智能(AI)跟踪报告指出,包括软件、硬件和服务在内的全球人工智能(AI)市场预计将在 2021 年同比增长 15.2%,达到 3418 亿美元。预计...
【热点】
阅读更多
热门文章
最新文章
友情链接
- 标签: 康师傅
- https://www.teamlab.art/es/?submit=谷歌霸屏外推技术【tg:seogoogle987】,Vm6
- https://www.remit.co.jp/ne/?s=谷歌霸屏外推技术【tg:seogoogle987】,xvs
- https://www.safetv.go.kr/base/search/view?searchWord=谷歌霸屏外推技术【tg:seogoogle987】ZbW
- https://www.remit.co.jp/pt/?action=CHECK&s=谷歌霸屏外推技术【tg:seogoogle987】,gfs
- https://www.wmfe.org/?s=谷歌霸屏外推技术【tg:seogoogle987】,NBR
- https://www.localfootdoc.com/?s=谷歌霸屏外推技术【tg:seogoogle987】,ZAu
- https://www.flickr.com/photos/tags/谷歌霸屏外推技术【tg:seogoogle987】8LT
- https://www.livehindustan.com/tags/谷歌霸屏外推技术【tg:seogoogle987】,xXl
- https://www.maine.gov/pfr/professionallicensing/search/node?keys=谷歌霸屏外推技术【tg:seogoogle987】,KFu
- https://www.sonepar.ch/fr/search?q=谷歌霸屏外推技术【tg:seogoogle987】,E5j
- https://www.sbaad.no/search/谷歌霸屏外推技术【tg:seogoogle987】,xkl
- https://www.soccerbible.com/search?q=谷歌霸屏外推技术【tg:seogoogle987】,CeF
- https://www.smics.com/tc/site/search?token=谷歌霸屏外推技术【tg:seogoogle987】,ML5
- https://hsmoa.com/search?query=谷歌霸屏外推技术【tg:seogoogle987】1Bo
- https://www.otakuninjahero.com/en/search/谷歌霸屏外推技术【tg:seogoogle987】,jBq
- https://www.rookwinkel.nl/catalogsearch/result/index/?q=谷歌霸屏外推技术【tg:seogoogle987】,W50
- https://www.wheels24.gr/?action=CHECK&s=谷歌霸屏外推技术【tg:seogoogle987】,rkg
- https://www.mesec.cz/vyhledavani/?qs=谷歌霸屏外推技术【tg:seogoogle987】,RVZ
- https://www.ncetm.org.uk/search?action=CHECK&q=谷歌霸屏外推技术【tg:seogoogle987】,r4y
- https://www.yli.ro/catalogsearch/result/?q=谷歌霸屏外推技术【tg:seogoogle987】,e98
- https://www.world-architects.com/en/search?term=谷歌霸屏外推技术【tg:seogoogle987】,nzH
- https://zhidao.baidu.com/index/?action=QUERY&word=谷歌霸屏外推技术【tg:seogoogle987】,lf7
- https://jihoon471.cafe24.com/product/search.html?banner_action=&keyword=谷歌霸屏外推技术【tg:seogoogle987】rjD
- https://www.unclefossil.com/search/谷歌霸屏外推技术【tg:seogoogle987】,vLg
- https://www.manga-news.com/index.php/recherche/?q=谷歌霸屏外推技术【tg:seogoogle987】,QLV
- https://www.nonsolocap.it/cap?action=SEARCH&k=谷歌霸屏外推技术【tg:seogoogle987】,6kB
- https://www.parriscues.com/catalogsearch/result/?q=谷歌霸屏外推技术【tg:seogoogle987】,7mK
- https://www.lyrics.com/lyrics/kkk3谷歌霸屏外推技术【tg:seogoogle987】,rd5
- https://www.sbaad.no/?s=谷歌霸屏外推技术【tg:seogoogle987】,mBG
- https://www.flickr.com/photos/tags/谷歌霸屏外推技术【tg:seogoogle987】bSu
- https://www.miamiopenmri.com/?action=CHECK&s=谷歌霸屏外推技术【tg:seogoogle987】,eqq
- https://www.nextavenue.org/?action=QUERY&s=谷歌霸屏外推技术【tg:seogoogle987】,LYL
- https://www.niaogebiji.com/pc/article/search?keyword=谷歌霸屏外推技术【tg:seogoogle987】,JWm
- https://www.roblox.com/discover/?cat=107&Keyword=谷歌霸屏外推技术【tg:seogoogle987】,WJz
- https://www.spoiledsweetboutique.com/search/谷歌霸屏外推技术【tg:seogoogle987】,kyw
- https://www.polar-tech.com/?action=QUERY&s=谷歌霸屏外推技术【tg:seogoogle987】,gP7
- https://www.vietnamconsulate-sf.org/?action=CHECK&s=谷歌霸屏外推技术【tg:seogoogle987】,GSd
- https://www.nissin.com/jp/search/?cat=105&q=谷歌霸屏外推技术【tg:seogoogle987】,8rl
- https://www.lyrics.com/lyrics/谷歌霸屏外推技术【tg:seogoogle987】,Snd
- https://www.stormberg.com/no/search?q=谷歌霸屏外推技术【tg:seogoogle987】,ODP
- https://www.tailoy.com.pe/catalogsearch/result/?q=谷歌霸屏外推技术【tg:seogoogle987】,07p
- https://www.losgatoschamber.com/list/search?action=SEARCH&q=谷歌霸屏外推技术【tg:seogoogle987】,gqo
- https://www.kores.com/?s=谷歌霸屏外推技术【tg:seogoogle987】,CYF
- https://www.lezhin.com/ko/tags/谷歌霸屏外推技术【tg:seogoogle987】,8IH
- https://www.lifesciencesweden.se/search?q=谷歌霸屏外推技术【tg:seogoogle987】,Xi5
- https://www.nytimes.com/search?dropmab=true&query=谷歌霸屏外推技术【tg:seogoogle987】,w8y
- https://www.pixiv.net/tags/谷歌霸屏外推技术【tg:seogoogle987】,nHQ
- https://yscc1986.net/search/谷歌霸屏外推技术【tg:seogoogle987】hS2
- https://www.klatreverden.no/search?q=谷歌霸屏外推技术【tg:seogoogle987】,bx1
- https://www.goodreads.com/quotes/tag/谷歌霸屏外推技术【tg:seogoogle987】BQL