[英]Connect docker container (django app) to windows lan
I would like to run a docker in our windows environment so that staff can access the application from their own computers, but cannot get it working. 我想在Windows环境中运行一个docker,以便员工可以从自己的计算机访问该应用程序,但无法使其正常运行。
I have tried both solutions of NAT and bridged mode that were suggested here to no avail: 我已经尝试了NAT和桥接模式的两种解决方案,但都无济于事:
How to connect to a docker container from outside the host (same network) [Windows] 如何从主机外部(同一网络)连接到Docker容器[Windows]
When I use NAT mode, I am able to connect to the app through the localhost of the host computer (127.0.0.1:8000), when I use bridged mode I am able to use the IP of the docker machine (192.168.99.100:8000) but I cannot access them from other computers in the LAN. 当我使用NAT模式时,我可以通过主机的本地主机(127.0.0.1:8000)连接到应用程序,当我使用桥接模式时,我可以使用docker计算机的IP地址(192.168.99.100: 8000),但我无法从LAN中的其他计算机访问它们。
I am able to ping the computer where the docker container is located from another one in the same LAN, but when I type its url into the browser, I get the standard IIS landing page. 我能够从同一局域网中的另一台计算机ping docker容器所在的计算机,但是当我在浏览器中键入其url时,我得到了标准的IIS登陆页面。 I deleted the default site in IIS in case it was taking up the port that I was trying to allocate to the docker container, but that did not work- I simply get a site cannot be reached page.
我删除了IIS中的默认站点,以防它占用了我试图分配给Docker容器的端口,但是那行不通-我只是得到了一个无法访问站点页面。
Ultimately, I just want to be able to access the app in the docker container from another computer inside the LAN on the windows server. 最终,我只想能够从Windows服务器上LAN内的另一台计算机访问docker容器中的应用程序。 Any ideas would be appreciated.
任何想法,将不胜感激。
Edit: I should mention that the person who takes care of the domain LAN, domain controller, said he could set a specific IP address for to connect to the virtualbox (docker container) but does not have any idea of how to do that- he has never heard of docker and unfamiliar with virtualbox. 编辑:我应该提一下,负责域LAN(域控制器)的人说,他可以设置用于连接到virtualbox(docker容器)的特定IP地址,但不知道该怎么做-他从未听说过docker并且不熟悉virtualbox。
What finally worked for me was the following: 最终对我有用的是:
Virtualbox setup 虚拟箱设置
Virtualbox settings 虚拟箱设置
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.