id: 19db676f79744528b06ecfac216d47db
parent_id: 
item_type: 1
item_id: dfc520f271b24c15ad5b38f5f19f14a6
item_updated_time: 1764345613903
title_diff: "[{\"diffs\":[[1,\"125个Docker的常用命令\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":15}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>125个Docker的常用命令</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <meta name=\\\"content-class\\\" content=\\\"yinxiang.peso.superNote\\\"/>\\\r\\\n  <meta name=\\\"application-data:yinxiang.noteLayout\\\" content=\\\"{\\\"lineSpace\\\":\\\"recommend\\\",\\\"paragraphSpace\\\":\\\"recommend\\\"}\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"35392\\\"></a>\\\r\\\n<h1>125个Docker的常用命令</h1>\\\r\\\n\\\r\\\n<div><span style=\\\"\\\"><div style=\\\"max-width: 700px;\\\"><p></p><div style=\\\"--en-blockquote: true; box-sizing: border-box; border-left: 3px solid #b4c0cc; background-position: initial initial; background-repeat: initial initial;\\\"><div>原文链接: <a href=\\\"http://mp.weixin.qq.com/s?__biz=MzU1MjcyNDMwMw==&amp;mid=2247502660&amp;idx=1&amp;sn=baa393fbffb6031e46c7dc407b70a976&amp;chksm=fa854b518ff5fbbca3bad85c8593271400d45c86c68982431b4067e0632fe74a0dcd0a0cb7bc&amp;mpshare=1&amp;scene=1&amp;srcid=1230iT75LI0TXrYliLihq0cn&amp;sharer_shareinfo=90ed7ae059e7d96d63b48df3214e5b5f&amp;sharer_shareinfo_first=90ed7ae059e7d96d63b48df3214e5b5f#rd\\\"><span>http://mp.weixin.qq.com/s?__biz=MzU1MjcyNDMwMw==&amp;mid=2247502...</span></a></div></div><p></p><div style=\\\"-webkit-tap-highlight-color: transparent;\\\"><div style=\\\"-webkit-tap-highlight-color: transparent;\\\"><div style=\\\"-webkit-tap-highlight-color: transparent;\\\"><div style=\\\"-webkit-tap-highlight-color: transparent;\\\"><span style=\\\"-webkit-tap-highlight-color: transparent;\\\">原创</span><span style=\\\"-webkit-tap-highlight-color: transparent;\\\"> huaan9527 </span><span style=\\\"-webkit-tap-highlight-color: transparent;\\\"><a style=\\\"-webkit-tap-highlight-color: transparent;\\\"> 测试开发学习交流 </a></span><span style=\\\"-webkit-tap-highlight-color: transparent;\\\"><em style=\\\"-webkit-tap-highlight-color: transparent;\\\"></em></span></div><div style=\\\"-webkit-tap-highlight-color: transparent;\\\"><p style=\\\"-webkit-tap-highlight-color: transparent;\\\"><br style=\\\"-webkit-tap-highlight-color: transparent;\\\"/></p><table cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" style=\\\"-webkit-tap-highlight-color: transparent;\\\" width=\\\"566\\\"><colgroup style=\\\"-webkit-tap-highlight-color: transparent;\\\"><col style=\\\"-webkit-tap-highlight-color: transparent; width: 99.2pt;\\\" width=\\\"99\\\"></col><col style=\\\"-webkit-tap-highlight-color: transparent; width: 184.8pt;\\\" width=\\\"184\\\"></col><col style=\\\"-webkit-tap-highlight-color: transparent; width: 282.4pt;\\\" width=\\\"282\\\"></col></colgroup><tbody style=\\\"-webkit-tap-highlight-color: transparent;\\\"><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 20.4pt;\\\"><td colspan=\\\"3\\\" height=\\\"20\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(0,0,0); border-width: initial; border-style: none; border-color: initial; vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\" width=\\\"566\\\">基本命令</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\">命令</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\">描述</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\">示例</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker run</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">创建并启动一个容器</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker run -it ubuntu bash</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker ps</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">列出当前运行的容器</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker ps</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker ps -a</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">列出所有容器，包括未运行的</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker ps -a</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker stop</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">停止一个运行中的容器</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker stop [CONTAINER_ID]</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker start</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">启动一个已停止的容器</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker start [CONTAINER_ID]</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker restart</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">重启容器</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker restart [CONTAINER_ID]</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker rm</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">删除一个或多个容器</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker rm [CONTAINER_ID]</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker pull</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">从仓库拉取一个镜像</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker pull ubuntu</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker images</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">列出本地存储的镜像</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker images</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker rmi</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">删除一个或多个镜像</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker rmi [IMAGE_ID]</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker build</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">从Dockerfile构建镜像</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker build -t my-image:tag .</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker exec</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">在运行的容器中执行命令</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker exec -it [CONTAINER_ID] bash</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker logs</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">获取容器的日志</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker logs [CONTAINER_ID]</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker commit</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">从修改过的容器创建新的镜像</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker commit [CONTAINER_ID] new-image</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker inspect</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">获取容器或镜像的详细信息</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker inspect [CONTAINER_ID/IMAGE_ID]</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">docker network</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\">管理Docker网络</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255); word-break: break-all;\\\">docker network ls</td></tr></tbody></table><table cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" style=\\\"-webkit-tap-highlight-color: transparent;\\\" width=\\\"566\\\"><colgroup style=\\\"-webkit-tap-highlight-color: transparent;\\\"><col style=\\\"-webkit-tap-highlight-color: transparent; width: 99.2pt;\\\" width=\\\"99\\\"></col><col style=\\\"-webkit-tap-highlight-color: transparent; width: 184.8pt;\\\" width=\\\"184\\\"></col><col style=\\\"-webkit-tap-highlight-color: transparent; width: 282.4pt;\\\" width=\\\"282\\\"></col></colgroup><tbody style=\\\"-webkit-tap-highlight-color: transparent;\\\"><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 20.4pt;\\\"><td colspan=\\\"3\\\" height=\\\"20\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(0,0,0); border-width: initial; border-style: none; border-color: initial; vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\" width=\\\"566\\\">镜像管理指令</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\">命令</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\">描述</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\">示例</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker images</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">列出本地的所有镜像</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker images</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker pull</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">从镜像仓库拉取指定的镜像</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker pull ubuntu:18.04</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker push</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">将本地镜像推送到镜像仓库</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker push myrepo/myimage:tag</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker rmi</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">删除一个或多个本地存储的镜像</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker rmi ubuntu</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker build</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">使用Dockerfile构建新的镜像</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker build -t myimage .</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker history</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">显示镜像的历史信息</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker history myimage</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker inspect</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">显示镜像的详细信息</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker inspect ubuntu</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker tag</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">为镜像添加一个新的标签</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker tag ubuntu:18.04 myubuntu:latest</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker save</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">将镜像保存为tar归档文件</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker save myimage &gt; myimage.tar</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker load</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">从tar归档文件加载镜像</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker load &lt; myimage.tar</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker import</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">从归档文件创建镜像</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker import mycontainer.tar myimage</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker export</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">将容器快照导出为归档文件</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker export mycontainer &gt; mycontainer.tar</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker create</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">创建一个新容器但不启动它</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker create ubuntu:18.04</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker commit</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">从容器创建镜像</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker commit mycontainer mynewimage</td></tr></tbody></table><table cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" style=\\\"-webkit-tap-highlight-color: transparent;\\\" width=\\\"566\\\"><colgroup style=\\\"-webkit-tap-highlight-color: transparent;\\\"><col style=\\\"-webkit-tap-highlight-color: transparent; width: 99.2pt;\\\" width=\\\"99\\\"></col><col style=\\\"-webkit-tap-highlight-color: transparent; width: 184.8pt;\\\" width=\\\"184\\\"></col><col style=\\\"-webkit-tap-highlight-color: transparent; width: 282.4pt;\\\" width=\\\"282\\\"></col></colgroup><tbody style=\\\"-webkit-tap-highlight-color: transparent;\\\"><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 20.4pt;\\\"><td colspan=\\\"3\\\" height=\\\"20\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(0,0,0); border-width: initial; border-style: none; border-color: initial; vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\" width=\\\"566\\\">容器管理指令</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\">命令</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\">描述</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\">示例</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker run</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">创建一个新容器并运行一个命令</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker run -it ubuntu /bin/bash</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker ps</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">列出当前运行中的容器</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker ps</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker ps -a</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">列出所有容器，包括未运行的</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker ps -a</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker stop</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">停止一个或多个运行中的容器</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker stop [CONTAINER_ID]</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker start</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">启动一个或多个已停止的容器</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker start [CONTAINER_ID]</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker restart</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">重启一个或多个容器</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker restart [CONTAINER_ID]</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker kill</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">立即终止容器的运行</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker kill [CONTAINER_ID]</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker rm</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">删除一个或多个容器</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker rm [CONTAINER_ID]</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker exec</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">在运行的容器中执行命令</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker exec -it [CONTAINER_ID] /bin/bash</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker attach</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">连接到正在运行的容器</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker attach [CONTAINER_ID]</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 36pt;\\\"><td height=\\\"36\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker cp</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">从容器中复制文件/目录到主机，反之亦然</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker cp [CONTAINER_ID]:/path/to/file /dest</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"99\\\">docker logs</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">获取容器的日志</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker logs [CONTAINER_ID]</td></tr></tbody></table><table cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" style=\\\"-webkit-tap-highlight-color: transparent;\\\" width=\\\"618\\\"><colgroup style=\\\"-webkit-tap-highlight-color: transparent;\\\"><col style=\\\"-webkit-tap-highlight-color: transparent; width: 150.8pt;\\\" width=\\\"150\\\"></col><col style=\\\"-webkit-tap-highlight-color: transparent; width: 184.8pt;\\\" width=\\\"184\\\"></col><col style=\\\"-webkit-tap-highlight-color: transparent; width: 282.4pt;\\\" width=\\\"282\\\"></col></colgroup><tbody style=\\\"-webkit-tap-highlight-color: transparent;\\\"><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 20.4pt;\\\"><td colspan=\\\"3\\\" height=\\\"20\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(0,0,0); border-width: initial; border-style: none; border-color: initial; vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\" width=\\\"618\\\">数据管理与卷指令</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\">命令</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\">描述</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\">示例</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 36pt;\\\"><td height=\\\"36\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker volume create</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">创建一个新的卷</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker volume create my_volume</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker volume ls</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">列出所有卷</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker volume ls</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 36pt;\\\"><td height=\\\"36\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker volume inspect</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">显示指定卷的详细信息</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker volume inspect my_volume</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 36pt;\\\"><td height=\\\"36\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker volume rm</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">删除一个或多个卷</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker volume rm my_volume</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 36pt;\\\"><td height=\\\"36\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker volume prune</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">删除所有未使用的卷</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker volume prune</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 36pt;\\\"><td height=\\\"36\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker cp</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">从主机复制文件到容器，或者从容器复制到主机</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker cp foo.txt mycontainer:/foo.txt</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 36pt;\\\"><td height=\\\"36\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker create</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">创建一个新容器，用于数据卷</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker create -v /dbdata --name dbstore training/postgres</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 36pt;\\\"><td height=\\\"36\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker run -v</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">在运行容器时挂载卷</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker run -d -P --name web -v /webapp training/webapp app.py</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 36pt;\\\"><td height=\\\"36\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker run --mount</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">使用更详细的挂载配置运行容器</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker run --mount source=my_volume,target=/data my_image</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 53pt;\\\"><td height=\\\"53\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker service create</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">在服务中使用卷</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker service create --replicas=1 --name my_service --mount type=volume,src=my_volume,dst=/data my_image</td></tr></tbody></table><table cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" style=\\\"-webkit-tap-highlight-color: transparent;\\\" width=\\\"618\\\"><colgroup style=\\\"-webkit-tap-highlight-color: transparent;\\\"><col style=\\\"-webkit-tap-highlight-color: transparent; width: 150.8pt;\\\" width=\\\"150\\\"></col><col style=\\\"-webkit-tap-highlight-color: transparent; width: 184.8pt;\\\" width=\\\"184\\\"></col><col style=\\\"-webkit-tap-highlight-color: transparent; width: 282.4pt;\\\" width=\\\"282\\\"></col></colgroup><tbody style=\\\"-webkit-tap-highlight-color: transparent;\\\"><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 20.4pt;\\\"><td colspan=\\\"3\\\" height=\\\"20\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(0,0,0); border-width: initial; border-style: none; border-color: initial; vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\" width=\\\"618\\\">网络配置指令</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 17.6pt;\\\"><td height=\\\"17\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\">命令</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\">描述</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(181,198,234); text-align: center;\\\">示例</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker network create</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">创建一个新的网络</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker network create --driver bridge my_network</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker network ls</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">列出所有网络</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker network ls</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker network rm</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">删除一个或多个网络</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker network rm my_network</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker network inspect</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">显示一个或多个网络的详细信息</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker network inspect my_network</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker network connect</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">连接一个容器到网络</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker network connect my_network my_container</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 36pt;\\\"><td height=\\\"36\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker network disconnect</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">断开容器与网络的连接</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker network disconnect my_network my_container</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker run --network</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">在特定网络下运行一个新的容器</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker run --network=my_network my_image</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 18pt;\\\"><td height=\\\"18\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker network prune</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">删除所有未使用的网络</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker network prune</td></tr><tr style=\\\"-webkit-tap-highlight-color: transparent; height: 36pt;\\\"><td height=\\\"36\\\" style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"150\\\">docker service create</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"184\\\">在特定网络下创建一个服务</td><td style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(44,44,54); border-width: 0.5pt; border-color: rgb(0,0,0); vertical-align: middle; background: rgb(255,255,255);\\\" width=\\\"282\\\">docker service create --network my_network my_service</td></tr></tbody></table><p style=\\\"-webkit-tap-highlight-color: transparent; letter-spacing: 0.578px; text-align: center;\\\"><img src=\\\":/76bfbd2eb75f40738b9f0f4e74a873c0\\\" type=\\\"image/gif\\\" data-filename=\\\"640.gif\\\" style=\\\"--en-marks: %7B%22align%22%3A%22center%22%7D; -webkit-tap-highlight-color: transparent; height: 121px; letter-spacing: 0.034em; width: auto;\\\" width=\\\"auto\\\"/><br style=\\\"-webkit-tap-highlight-color: transparent;\\\"/></p><div style=\\\"-webkit-tap-highlight-color: transparent; overflow: hidden; color: rgb(0,0,0); letter-spacing: normal; text-align: start; word-break: break-all;\\\"><div style=\\\"-webkit-tap-highlight-color: transparent; display: flex; word-break: break-all;\\\"><div style=\\\"-webkit-tap-highlight-color: transparent; word-break: break-all;\\\"><img src=\\\":/9e44117d74db4ac086cd0e27696f94cd\\\" type=\\\"image/gif\\\" data-filename=\\\"640.gif\\\" style=\\\"--en-marks: %7B%22align%22%3A%22center%22%7D; -webkit-tap-highlight-color: transparent; display: block; word-break: break-all; width: auto;\\\" width=\\\"auto\\\"/></div></div></div><p style=\\\"-webkit-tap-highlight-color: transparent; letter-spacing: 0.578px; text-align: left;\\\"><br style=\\\"-webkit-tap-highlight-color: transparent;\\\"/></p><p style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(51,51,51); letter-spacing: 1px; word-break: break-all;\\\"> 每一次互动，皆是鼓励，</p><p style=\\\"-webkit-tap-highlight-color: transparent; color: rgb(51,51,51); letter-spacing: 1px; word-break: break-all;\\\"> 每一份支持，共促成长。</p><p style=\\\"-webkit-tap-highlight-color: transparent;\\\"><br style=\\\"-webkit-tap-highlight-color: transparent;\\\"/></p><p style=\\\"-webkit-tap-highlight-color: transparent;\\\"><br style=\\\"-webkit-tap-highlight-color: transparent;\\\"/></p></div></div></div></div></div></span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":55078}]"
metadata_diff: {"new":{"id":"dfc520f271b24c15ad5b38f5f19f14a6","parent_id":"f67288c3a0be4374b5d532b5dcc3aabc","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764348810537,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T21:03:03.759Z
created_time: 2025-11-28T21:03:03.759Z
type_: 13