nginx容器启动后命令
时间: 2023-08-05 18:02:34 浏览: 183
详解docker nginx 容器启动挂载到本地
nginx容器启动后的命令是:
```
docker run --name nginx-first -p 90:80 -v /var/dps/nginx:/nginx -d nginx
```
这个命令会创建一个名为nginx-first的容器,将容器中的80端口映射到宿主机的90端口,同时将容器中的某一文件夹挂载到宿主机的某一文件夹。容器会以后台模式运行,并使用nginx镜像作为容器的基础镜像。
#### 引用[.reference_title]
- *1* *3* [Docker运行Nginx容器](https://blog.csdn.net/D_ps19990501/article/details/126274659)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [使用容器运行nginx及docker命令介绍](https://blog.csdn.net/qq_44418229/article/details/126922377)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文