-v
参数语法为 -v host dir:container dir[:ro|rw]
-p host port:container port
; -p 8080:80 将主机上的8080端口绑定到容器上的80端口,因此在主机中访问8080端口时其实就是访问 nginx 容器的80端口/etc/nginx/conf.d/defautl.conf
文件复制出来,不然会报错。80
端口映射到主机的 802
端口webserver
html
挂载到容器的 /html
nginx
配置,挂载到容器的 /etc/nginx/conf.d
容器名称
或者 容器ID