docker run 常用 指令

https://www.runoob.com/docker/docker-run-command.html

-i:打开STDIN,用于控制台交互。

-d:容器在后台运行。

-p:指定端口映射。

--restart:本参数用于指定在容器退出时,是否重启容器。

-v:本参数用于指定容器卷。

-t:分配虚拟终端,本参数不支持。

-e:容器运行的环境变量。

-u, --user="":指定容器的用户。

--privileged=false:指定容器是否为特权容器,特权容器拥有所有的capabilities。

--rm=false:Automatically remove the container when it exits.

 
原文地址:https://www.cnblogs.com/ncepu/p/14894855.html