简体   繁体   English

如何为Windows容器给docker分配一个自己的IP地址?

[英]How do I give an own ip address to docker for Windows container?

I want to export the complete ip connectivity (UDP and TCP) from a docker container with a Linux app (ie give it's own ip address (in the same subnet as the host), that can be accessed from the host and from other physical machines on the network). 我想使用Linux应用程序从Docker容器中导出完整的ip连接(UDP和TCP)(即,给它自己的ip地址(与主机位于同一子网中),可以从主机和其他物理机上访问在网络上)。

What do I need to configure in Windows, what in docker, what inside the container? 我需要在Windows中配置什么,在docker中配置什么,在容器内部配置什么?

(NB: I don NOT want to expose ports as part of the host). (注意:我不想将端口公开为主机的一部分)。

I finally solved the problem (for me) by installing Ubuntu in Virtual Box and using the docker containers from there. 我终于(通过我自己)通过在Virtual Box中安装Ubuntu并从那里使用docker容器解决了这个问题。 Not the most elegant solution but working on first try. 不是最优雅的解决方案,而是首先尝试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM