Nginx和Docker-将localhost端口8000暴露给localhost端口80

时间:2018-11-19 11:18:23

标签: docker web nginx server

我有一个docker容器在localhost:8000上展示一个Web应用程序。

我想添加一个单独的Nginx docker容器作为反向代理,以在localhost:80上显示Web应用程序,我将打开该应用程序以从更广泛的Internet访问。

但是,运行:docker run --name nginx -p 80:8000 --rm nginx将nginx docker容器中的端口8000公开给localhost:80。

我如何通过正在运行主机的Web应用程序上的localhost:8000通过Nginx容器暴露给也在我的主机上的localhost:80

非常感谢, 罗宾

0 个答案:

没有答案