From c6869288c2413ea55bab2d1dd0ff4312bc7788de Mon Sep 17 00:00:00 2001 From: "rick.chan" Date: Tue, 12 May 2020 16:49:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BB=A5=E9=9A=8F=E5=8D=B3?= =?UTF-8?q?=E6=98=A0=E5=B0=84=E7=AB=AF=E5=8F=A3=E6=96=B9=E5=BC=8F=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E5=91=BD=E4=BB=A4.?= 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Software/Applications/Docker/Docker_安装和使用.md b/Software/Applications/Docker/Docker_安装和使用.md index b9bb461..8c6ccf3 100644 --- a/Software/Applications/Docker/Docker_安装和使用.md +++ b/Software/Applications/Docker/Docker_安装和使用.md @@ -91,6 +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 --net= -it -v : /bin/bash # 查看正在运行的容器