您现在的位置是:热点 >>正文
云计算核心技术Docker教程:Java镜像停止、启动和命名容器
热点892978人已围观
简介...
您可以启动、停止和重新启动 Docker 容器。当我们停止一个容器时,它并没有被移除,而是状态变成了stopped,容器内的进程也停止了。当我云计们docker ps在上一个模块中运行命令时,默认输出仅显示正在运行的容器。当我们通过--all或-a简称时,我们会看到机器上的所有容器,而不管它们算核的启动或停止状态。
$ docker ps -a
您现在应该看到列出了几个容器。这些是我们启动和停止但尚未删除的容器。
让我们重新启动刚刚停止的容器。找到我们刚心技刚停止的容器名称,并使用restart命令替换下面的容器名称。
$ docker restart trusting_beaver
现在,使用docke术Dr ps命令再次列出所有容器。
$ docker ps -a
请注意,我们刚刚重新启动的容器已在分离模式下启动并暴露了端口 8080。另外,观察容器的状oc态是“Up X seconds”。当您重新启动容器时,它会以与最初启动时相同的标志或命令启动。
现在,让我们停止并移除我们所有的容器,看看如何修复随机命名ke问题。找到您正在运行的容器的名称,并将以下命令中的名称替换为您系统上的容器名称。
$ docker stop trusting_beaver
trustr教ing_beaver
现在我们的容器已停止,让我们将其删除。当您移除容器时,容器内的进程将停止并且容器的元数据将被移除。
要删除容器,只需运行dock程:er rm传递容器名称的命令即可。您可以使用单个命令将多个容器名称传递给命令。同样,将以下命令中的容器名称替换为您系统中的容器名称。
$ docker rJam trusting_beaver modest_khayyam lucid_greider
trusting_beaver
modest_khayyam
lvaucid_greider
docker ps --all再次运行该命令以查看所有容器都已删除。
现在,让我们解决随机命名问题。标准做法是为您的容器命名,原镜像因很简单,这样更容易识别容器中运行的内容以及它关联的应用程序或服务。
要命名容器,我们只需要将--name标志传递给docker run命令。
$ doc停止ker run --rm -d -p 8080:8080 --name springboot-server java-docker
2e907c68d1c98be、启37d2b2c2ac6b16f353c85b3757e549254de68746a94a8a8d3
这样更好!我们现在可以根据名称轻松识别我们动和的容器。
Tags:
相关文章
标签: 米哈游 自由人米八 Joker 皮套论
热点云梦级5月11日云梦级消息,据米哈游法务部透露,近日,米哈游诉网络博主许某鹏(网名“自由人米八”)、罗某杰(网名“Joker”“内幕哥”“不锈钢脸盆爱好者”)商业诋毁案迎来终审判决。 此前,两人在直播...
【热点】
阅读更多思科第四财季营收131亿美元 净利润同比增长14%
热点查看最新行情 新浪科技讯 北京时间8月19日凌晨消息,思科今天发布了2021财年第四财季及全年财报。报告显示,思科第四财季净营收为131亿美元,与上年同期的122亿美元相比增长8%;净利润为30亿美元...
【热点】
阅读更多PaaS、IaaS、SaaS、Bass、Fass、无服务的理解与区别
热点关于云计算的定义有多种说法,现阶段广为接受的是美国国家标准与技术研究院(NIST)定义:云计算是一种按使用量付费的模式,这种模式提供可用的、便捷的、按需的网络访问, 进入可配置的计算资源共享池(资源包...
【热点】
阅读更多
热门文章
最新文章
友情链接
- 标签: 康师傅
- https://www.jusoen.com/addreng.asp?p1=谷歌霸屏外推技术【tg:seogoogle987】myw
- https://www.reginatangoshoes.com/en/catalogsearch/result/index/?T=1686132113407&q=谷歌霸屏外推技术【tg:seogoogle987】,AUy
- https://www.revere.org/search?action=SEARCH&q=谷歌霸屏外推技术【tg:seogoogle987】,h4R
- https://www.temu.com/search_result.html?search_key=谷歌霸屏外推技术【tg:seogoogle987】Mmz
- https://www.luxurysociety.com/en/search?q=谷歌霸屏外推技术【tg:seogoogle987】,KDx
- https://www.pierreherme.com/catalogsearch/result/?q=谷歌霸屏外推技术【tg:seogoogle987】,1Mz
- https://m.shoppinghow.kakao.com/m/search/q/谷歌霸屏外推技术【tg:seogoogle987】8Cz
- https://www.kubb-tool.bfs.admin.ch/en/search?action=CHECK&q=谷歌霸屏外推技术【tg:seogoogle987】,b2Q
- https://yscc1986.net/search/谷歌霸屏外推技术【tg:seogoogle987】MZK
- https://www.vet-direct.com/search?cat=72&term=谷歌霸屏外推技术【tg:seogoogle987】,1A2
- https://www.tiktok.com/tag/谷歌霸屏外推技术【tg:seogoogle987】,ZmJ
- https://www.l-and-b.jp/?page=1&s=谷歌霸屏外推技术【tg:seogoogle987】,Mc5
- https://www.nissin.com/jp/search/?cat=105&q=谷歌霸屏外推技术【tg:seogoogle987】,nF6
- https://www.remit.co.jp/id/?s=谷歌霸屏外推技术【tg:seogoogle987】,k2F
- https://www.remit.co.jp/en/?s=谷歌霸屏外推技术【tg:seogoogle987】,zl9
- https://yscc1986.net/search/谷歌霸屏外推技术【tg:seogoogle987】hd7
- https://www.solerpalau.com/en-en/catalogsearch/result/?q=谷歌霸屏外推技术【tg:seogoogle987】,AG1
- https://www.kuaikanmanhua.com/sou/谷歌霸屏外推技术【tg:seogoogle987】,TFQ
- https://www.realsporting.com/buscador?buscar=谷歌霸屏外推技术【tg:seogoogle987】,q7F
- https://www.unclefossil.com/search/谷歌霸屏外推技术【tg:seogoogle987】gad_source=1&gclid=Cj0KCQjw_-GxBhC1ARIsADGgDjsNKplUXa2F6YGlHBK2sHDQ88cgsJBb05DyO99TV9jNq_cT0kGMqyQaAgHQEALw_wcB
- https://www.scivee.tv/?s=谷歌霸屏外推技术【tg:seogoogle987】,jes
- https://www.nyif.com/catalogsearch/result/?q=谷歌霸屏外推技术【tg:seogoogle987】,8CL
- https://www.mi.com/search?keyword=谷歌霸屏外推技术【tg:seogoogle987】,5Lp
- https://www.posten-portal.de/search?query=谷歌霸屏外推技术【tg:seogoogle987】,9i8
- https://www.nonsolocap.it/cap?action=SEARCH&k=谷歌霸屏外推技术【tg:seogoogle987】,kvY
- https://www.remit.co.jp/ne/?s=谷歌霸屏外推技术【tg:seogoogle987】,vCM
- https://www.symatoys.com/search.html?ID=UyMD6aO58bPrJvQAB1I0N69KzJBZeNPC&keyword=谷歌霸屏外推技术【tg:seogoogle987】,Fz9
- https://www.nuovabai.it/catalogsearch/result/?action=SEARCH&q=谷歌霸屏外推技术【tg:seogoogle987】,KVc
- https://store.line.me/search/sticker/ja?q=谷歌霸屏外推技术【tg:seogoogle987】vXa
- https://www.nbm.org/?action=QUERY&s=谷歌霸屏外推技术【tg:seogoogle987】,lIg
- https://www.youtube.com/results?search_query=谷歌霸屏外推技术【tg:seogoogle987】,afw
- https://www.vfw.org/search-results?q=谷歌霸屏外推技术【tg:seogoogle987】,bid
- https://m.shoppinghow.kakao.com/m/search/q/谷歌霸屏外推技术【tg:seogoogle987】xZE
- https://www.youtube.com/hashtag/谷歌霸屏外推技术【tg:seogoogle987】,jHu
- https://www.navymwr.org/search/?query=谷歌霸屏外推技术【tg:seogoogle987】,fXm
- https://www.theaerogroup.net/?cat=28&s=谷歌霸屏外推技术【tg:seogoogle987】,7Zn
- https://dict.naver.com/dict.search?dicQuery&query=谷歌霸屏外推技术【tg:seogoogle987】Jrv
- https://www.seagrant.wisc.edu/?page=63&s=谷歌霸屏外推技术【tg:seogoogle987】,esX
- https://www.oprny.com/search.php?search_query=谷歌霸屏外推技术【tg:seogoogle987】,r4r
- https://www.tycoonstory.com/?s=谷歌霸屏外推技术【tg:seogoogle987】,qya
- https://www.safetv.go.kr/base/search/view?searchWord=谷歌霸屏外推技术【tg:seogoogle987】FmP
- https://www.wilsonart.com/catalogsearch/result/?action=CHECK&q=谷歌霸屏外推技术【tg:seogoogle987】,4uD
- https://www.teamlab.art/pt/?submit=谷歌霸屏外推技术【tg:seogoogle987】,A85
- https://www.schenckprocess.com/search?q=谷歌霸屏外推技术【tg:seogoogle987】,LTt
- https://www.manga-news.com/index.php/recherche/?q=谷歌霸屏外推技术【tg:seogoogle987】,ErG
- https://www.oikos-tecnics.com/?s=谷歌霸屏外推技术【tg:seogoogle987】,UCL
- https://www.xvideos.com/tags/谷歌霸屏外推技术【tg:seogoogle987】,U34
- https://www.tarleton.edu/?s=谷歌霸屏外推技术【tg:seogoogle987】,mHu
- https://www.klatreverden.no/search?q=谷歌霸屏外推技术【tg:seogoogle987】,R3i
- https://www.trockenmittel.ch/catalogsearch/result/?iC=ZM3&q=谷歌霸屏外推技术【tg:seogoogle987】,F51