您现在的位置是:热点 >>正文
云计算核心技术Docker教程:在docker-compose中使用卷
热点6860153人已围观
简介...
卷是用于持久化由Docker容器生成和使用的数据的首选机制。尽管绑定安装取决于主机的目录结构和操作系统,但是卷完全由Docker管理。
具有卷的单个Doc云计ker组合服务如下所示:
version: "3.9"
services:
frontend:
ima算核ge: node:lts
volumes:
- myapp:/h心技ome/node/app
volumes:
myapp:
在第一次调用时docker-compose up,将创建该卷。在随后的调用中将重用相术D同的卷。
可以在compose外部直接创建一个卷docker volume create,然后在内部docker-compose.yml按如下方式进行引用:
verocsion: "3.9"
services:
frontend:
image: node:lts
&nkebsp; volumes:
- myapp:/home/node/ar教pp
volumes:
myapp:
external: true
用卷启动服务
启动服务并定义卷程:时,每个服务容器都使用其自己的本地卷。如果您使用local 卷驱动程序,则没有一个容器可以共享此数据,但是某些卷驱动程序确实支持共享存储。适用于AWS的D在docker和适用于Azure的Docker均使用Cloudstor插件支持持久存储。
以下示例nginx使用四个副本启动服务,每个副本使用一个称为的本地卷myocvol2。
$ docker service create -d \
--replicas=4 \
--name devtest-skeervice \
--mount source=myvol2,target=/app \
nginx:latest
使用r-docker service ps devtest-service验证服务正在运行:
$ docker service ps devtest-service
删除该服务,这co将停止其所有任务:
$ docker service rm devtest-service
删除服务不会删除该服务创建的任何卷。卷删除是一个单独的步骤。
Tags:
相关文章
美国国防部取消授予微软的价值100亿美元云计算合同
热点7月7日消息,据国外媒体报道,当地时间周二,美国国防部取消了授予微软的价值100亿美元的“联合企业防御基础设施”(Joint Enterprise Defense Infrastructure,简称J...
【热点】
阅读更多Google 将 TensorFlow Lite 引入 Play Services
热点近些年来,各大科技公司都在致力于人工智能与机器学习的研究,其中 Google 是在该领域发展最为迅速的公司,如今 Google 已经将这些技术运用于搜索、邮件、翻译、助手等多个领域。在今年的 Goog...
【热点】
阅读更多谷歌计划在越南建立“超大规模”数据中心,投资规模尚未披露
热点据外媒报道,美国科技巨头谷歌正计划在我国越南建设一个大型数据中心,这将是其在东南亚地区的首次此类投资。据悉,该数据中心将位于越南胡志明市,被定义为“超大规模”,目前关于投资金额的具体细节尚不清楚,正在...
【热点】
阅读更多
热门文章
最新文章
友情链接
- 标签: 康师傅
- https://www.le-trend.com/en/search/=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,Jf1
- https://www.unclefossil.com/search/谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,75B
- https://www.krisinformation.se/en/search?q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,Ke2
- https://www.lneg.pt/?cat=140&s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,lBr
- https://www.rostaing.com/catalogsearch/result/?cat=22&q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,ghX
- https://www.jusoen.com/addreng.asp?p1=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】Of5
- https://www.rookwinkel.nl/catalogsearch/result/index/?q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,vhF
- https://www.military-history.org/?s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,bq8
- https://www.qylaws.com/search/谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,LnC
- https://www.hanbat.ac.kr/search/front/Search.jsp?qt=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】cx8
- https://www.nonsolocap.it/cap?action=SEARCH&k=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,Y4K
- https://www.lindseymedicalsupply.com/search/谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,Q4c
- https://www.riohondo.edu/?action=QUERY&s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,5aD
- https://store.line.me/search/sticker/ja?q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】6EF
- https://www.nslcleaders.org/?s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,UDy
- https://jihoon471.cafe24.com/product/search.html?banner_action=&keyword=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】8vP
- https://www.teamlab.art/th/?submit=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,dsp
- https://www.vivaraise.fr/catalogsearch/result/?q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,GLv
- https://www.wheels24.gr/?action=CHECK&s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,Qag
- https://www.hanbat.ac.kr/search/front/Search.jsp?qt=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】zmh
- https://blvdseafood.com/?s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】YW4
- https://www.synonyms.com/antonyms/谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,QhN
- https://www.umc.edu/search.aspx?ID=I4gnDKRS991MFcIDDzoYze4aWSAszAm7&q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,tfm
- https://zhidao.baidu.com/index/?action=QUERY&word=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,3UO
- https://www.mygrandma.com/Items.aspx?search=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,vvR
- https://www.ntv.co.jp/3min/search/?action=QUERY&q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,0h8
- https://www.searcychamber.com/list/search?AsfnA=DtkTQzs&q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,lzc
- https://www.xbiao.com/search/index?tpf&wd=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,Hxx
- https://www.libros.unam.mx/catalogsearch/result/?cat=37&dir=asc&format=20&lit=20&manufacturer=3230&mode=list&order=year_edition&q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,W6M
- https://www.polar-tech.com/?action=QUERY&s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,2Sh
- https://www.uckfieldtc.gov.uk/?s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,g0Q
- https://www.zisha.com/shop/list.shtml?wap_keyword=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,LZE
- https://www.signingsavvy.com/sentence/谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,i3E
- https://www.oprny.com/search.php?search_query=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,G3h
- https://www.wellbees.com/index.php/catalogsearch/result/index/?q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,DAL
- https://www.ncetm.org.uk/search?action=CHECK&q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,2Nh
- https://www.sweat.com/collections/vendors?q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,6CH
- https://www.soccerbible.com/search?q=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,b5b
- https://www.tullygroup.us/?ID=hbkq8jFjrQlVRrwzEmvoUJJAY4e1Lfo5&s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,IFq
- https://www.tombow.com/en/search/谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,ogR
- https://www.msrenewal.com/search/谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,cRV
- https://www.sportbiketracktime.com/index.php?route=product/search&tag=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,sFa
- https://www.mdbg.net/chinese/dictionary?page=worddict&wdrst=0&wdqb=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,7ad
- https://www.tarleton.edu/?s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,xLv
- https://www.thealexandrian.net/?s=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,s9d
- https://www.otakuninjahero.com/en/search/谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,YO7
- https://www.duksung.ac.kr/search/front/Search.jsp?qt=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】ijb
- https://www.navymwr.org/search/?query=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,IWp
- https://www.pearlstonecenter.org/search/谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,QDa
- https://www.olx.ba/pretraga?trazilica=谷歌霸屏24小时见效-实现思路【tg:seogoogle987】,FMW