您现在的位置是:热点 >>正文
云计算核心技术Docker教程:docker-compose指定自定义网络
热点958人已围观
简介...
docker-compose不仅可以使用默认的应用程序网络,还可以使用顶级networks密钥指定自己的网络。这使您可以创建更复杂的拓扑并指定自定义网络驱动程序和选项。您还可以使用它将服务连接到不受Compose管理的外部创建的网络。
每个服务都可以使用服务级云计别 networks密钥指定要连接的网络,该服务级别密钥是引用顶级 networks密钥下条目的名称的列表。
这是一个示例Compose文件,定义了两个自定义网络。该proxy服务与该服务是隔离的db,因为它们不共享公共网络-只能app与两者通信。
version:算核 "3"
services:
proxy:
build: ./proxy
&nbs心技p; networks:
- frontend
app:
&术Dnbsp; build: ./app
networks:
&ocnbsp; - frontend
- backend
db:
&nkebsp; image: postgres
networks:
r教 - backend
networks:
frontend:
# Use a custom d程:river
driver: custom-driver-1
backend:
&nbdosp; # 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:
&nbs-cp; frontend:
name: custom_frontend
om driver: custom-driver-1
Tags:
相关文章
标签: IBM 裁员 AI 克里希纳
热点云梦级11月5日云梦级消息,据 CNBC 报道, IBM 将在 2025 年第 4 季度进行新一轮裁员,预计波及员工数量,在全球员工总数的占比为“较低的个位数”(low single-digit pe...
【热点】
阅读更多云计算开发实例:Python3 计数排序
热点计数排序的核心在于将输入的数据值转化为键存储在额外开辟的数组空间中。作为一种线性时间复杂度的排序,计数排序要求输入的数据必须是有确定范围的整数。 实例 执行以上代码输出结果为: 减少循环次数的参考...
【热点】
阅读更多腾讯辟谣!OpenAI 前研究员姚顺雨 “百万年薪” 入职传闻不实
热点近日,网络上流传着一个引发广泛关注的消息,称 OpenAI 的前研究员姚顺雨以超过1亿的薪资加盟腾讯。这一传闻瞬间成为了科技圈热议的话题,许多人对此表示惊讶,甚至怀疑这样高额的薪资是否真的存在。对于这...
【热点】
阅读更多
热门文章
最新文章
友情链接
- 标签: 康师傅
- https://www.jusoen.com/addreng.asp?p1=歌外推【tg:seogoogle987】dob
- https://www.flickr.com/photos/tags/歌外推【tg:seogoogle987】hP9
- https://www.reginatangoshoes.com/en/catalogsearch/result/index/?T=1686132113407&q=歌外推【tg:seogoogle987】,996
- https://www.temu.com/search_result.html?search_key=歌外推【tg:seogoogle987】ZBM
- 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】,IYN
- https://www.resopal.de/catalogsearch/result/?action=SEARCH&q=歌外推【tg:seogoogle987】,cgz
- https://www.lneg.pt/?cat=140&s=歌外推【tg:seogoogle987】,Jif
- https://www.rockngem.com/?action=CHECK&s=歌外推【tg:seogoogle987】,Uoi
- https://www.mingwai.edu.hk/?langzh-hant&s=歌外推【tg:seogoogle987】,cot
- https://www.thealexandrian.net/?s=歌外推【tg:seogoogle987】,ZaT
- https://www.livehindustan.com/tags/歌外推【tg:seogoogle987】,dbE
- https://www.parriscues.com/catalogsearch/result/?q=歌外推【tg:seogoogle987】,6zt
- https://www.nuovabai.it/catalogsearch/result/?action=SEARCH&q=歌外推【tg:seogoogle987】,WdW
- https://www.duksung.ac.kr/search/front/Search.jsp?qt=歌外推【tg:seogoogle987】QCC
- https://www.hanbat.ac.kr/search/front/Search.jsp?qt=歌外推【tg:seogoogle987】CsG
- https://store.line.me/search/sticker/ja?q=歌外推【tg:seogoogle987】5AJ
- https://www.klatreverden.no/search?q=歌外推【tg:seogoogle987】,45b
- https://www.vet-direct.com/search?cat=72&term=歌外推【tg:seogoogle987】,hLK
- https://www.zisha.com/shop/list.shtml?wap_keyword=歌外推【tg:seogoogle987】,28U
- https://www.localfootdoc.com/?s=歌外推【tg:seogoogle987】,0z3
- https://www.qidulp.com/search?query=歌外推【tg:seogoogle987】,QX1
- https://www.simcoemuskokahealth.org/SearchResults.aspx?SearchQuery=歌外推【tg:seogoogle987】,IST
- https://www.tycoonstory.com/?s=歌外推【tg:seogoogle987】,e9g
- https://www.nytimes.com/search?dropmab=true&query=歌外推【tg:seogoogle987】,CDg
- https://www.wikiart.org/pt/Search/歌外推【tg:seogoogle987】,xaa
- https://hsmoa.com/search?query=歌外推【tg:seogoogle987】QJH
- https://www.youm7.com/Home/Search?allwords=歌外推【tg:seogoogle987】,SwA
- https://www.lauben.com/de/?s=歌外推【tg:seogoogle987】,efr
- https://www.remit.co.jp/pt/?action=CHECK&s=歌外推【tg:seogoogle987】,eLg
- https://www.lssystems.co.uk/search?page=0&per_page=24&term=歌外推【tg:seogoogle987】,zVb
- https://www.safetv.go.kr/base/search/view?searchWord=歌外推【tg:seogoogle987】uqG
- https://www.military-history.org/?s=歌外推【tg:seogoogle987】,2bX
- https://www.paxnet.co.kr/search/jongmok?kwd=歌外推【tg:seogoogle987】mtq
- https://www.varian.com/en-au/search?cat=113&search=歌外推【tg:seogoogle987】,tSg
- https://www.impactpool.org/search/?type=79&q=歌外推【tg:seogoogle987】w4O
- https://www.lyrics.com/lyrics/歌外推【tg:seogoogle987】,xg8
- https://www.udc.co.uk/index.php?route=product/search&sort=p.price&order=DESC&tag=歌外推【tg:seogoogle987】,7px
- https://www.tombow.com/en/search/歌外推【tg:seogoogle987】,6eN
- https://www.stonerealestate.com.au/?cat=100&s=歌外推【tg:seogoogle987】,YNZ
- https://www.swecobelgium.be/?page=9&s=歌外推【tg:seogoogle987】,0Ni
- https://www.world-architects.com/en/search?term=歌外推【tg:seogoogle987】,fpl
- https://www.monroecounty.gov/search/?q=歌外推【tg:seogoogle987】,PeS
- https://5gaa.org/?token=6e2l7hjt2i26gzgctgwdrv7v0j6nxorq&s=歌外推【tg:seogoogle987】MBk
- https://www.vfw.org/search-results?q=歌外推【tg:seogoogle987】,LO9
- https://www.ons.gov.uk/search?q=歌外推【tg:seogoogle987】,EZq
- https://www.teamlab.art/pt/?submit=歌外推【tg:seogoogle987】,5sL
- https://www.kaliastyle.com/catalogsearch/result/?q=GOOGLE歌外推【tg:seogoogle987】,Wuv
- https://www.metaltix.com/?view=tours&filter=search&q=歌外推【tg:seogoogle987】,FOH
- https://www.dba.dk/soeg/?soeg=歌外推【tg:seogoogle987】u4s
- https://www.safetv.go.kr/base/search/view?searchWord=歌外推【tg:seogoogle987】eF6