简体   繁体   English

将Docker容器链接到外部公共IP

[英]Link docker container to external public IP

在我的机器上执行curl ifconfig.me ,我可以获取我的公共IP,但是在我的容器中不起作用。

The simple answer to my silly question is, we don't need to. 我愚蠢的问题的简单答案是,我们不需要。 Instead port binding is use to bind the container port to the system. 而是使用端口绑定将容器端口绑定到系统。 The public IP of system could be used with port to interact with hosted application. 系统的公共IP可与端口一起使用以与托管应用程序进行交互。 Silly me! 傻我!

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

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