docker run nginx
时间: 2023-08-27 08:20:23 浏览: 125
您可以使用以下命令来运行Nginx容器:$ docker run --name nginx-test -p 8080:80 -d nginx。
这条命令会在后台运行一个名为"nginx-test"的容器,并将容器的80端口映射到主机的8080端口上,从而可以通过访问主机的8080端口来访问Nginx服务。此命令使用的镜像是"nginx",它会自动下载最新版本的Nginx镜像并运行。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [【Docker 教程】Docker 运行 Nginx](https://blog.csdn.net/m0_66345324/article/details/125040943)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [使用容器运行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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文