Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

创建容器:

docker run -itd --name=container_name images_name

常用参数说明:

-p 88:80
端口映射:

88:宿主机端口  
80:容器端口
docker run -itd --name=ct_name -p 88:80 img_name

-v : 文件挂载(宿主机文件目录:容器文件目录)

-itd

-i: 以交互模式运行容器;
-d: 后台运行;
-t: 为容器重新分配一个伪输入终端;

--name

--name: 容器名字;

``