From 22e6210497f3d06d1d56f3d2a339b81bda5a33cb Mon Sep 17 00:00:00 2001 From: "rick.chan" Date: Wed, 13 May 2020 10:53:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=87=E5=AE=9A=E5=AE=B9=E5=99=A8=E5=90=8D?= =?UTF-8?q?=E7=A7=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: rick.chan --- Software/Applications/Docker/Docker_安装和使用.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Software/Applications/Docker/Docker_安装和使用.md b/Software/Applications/Docker/Docker_安装和使用.md index 8c6ccf3..ae3810c 100644 --- a/Software/Applications/Docker/Docker_安装和使用.md +++ b/Software/Applications/Docker/Docker_安装和使用.md @@ -91,8 +91,8 @@ docker pull ubuntu:18.04 docker run # 运行某镜像,为之创建容器,将宿主机端口影射到容器端口,并将宿主机的某目录挂载到容器的对应目录下 docker run -it -p -v : /bin/bash -# 运行某镜像,为之创建容器,随机映射主机端口和容器端口,并将宿主机的某目录挂载到容器的对应目录下 -docker run -it -P -v : /bin/bash +# 运行某镜像,为之创建容器,随机映射主机端口和容器端口,指定容器名称,并将宿主机的某目录挂载到容器的对应目录下 +docker run -it -P --name= -v : /bin/bash # 运行某镜像,为之创建容器,设置网络参数,并将宿主机的某目录挂载到容器的对应目录下 docker run --net= -it -v : /bin/bash # 查看正在运行的容器