From 4650524628b90db32908f4a508802055760b4f64 Mon Sep 17 00:00:00 2001 From: "rick.chan" Date: Wed, 13 May 2020 10:59:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=8B=E4=BA=88=20privileged=20=E6=9D=83?= =?UTF-8?q?=E9=99=90.?= 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 ae3810c..4d42b59 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 --name= -v : /bin/bash +# 运行某镜像,为之创建容器,随机映射主机端口和容器端口,指定容器名称,赋予 privileged 权限,并将宿主机的某目录挂载到容器的对应目录下 +docker run -it -P --name= --privileged -v : /bin/bash # 运行某镜像,为之创建容器,设置网络参数,并将宿主机的某目录挂载到容器的对应目录下 docker run --net= -it -v : /bin/bash # 查看正在运行的容器