dockerfile里的expose如何暴露ip加端口

如题,求指导。。谢谢
参与5

3同行回答

胶东牛国磊胶东牛国磊系统架构师百度游戏
The EXPOSE instructions informs Docker that the container will listen on the specified network ports at runtime. Docker uses this information to interconnect containers using links (see the Docker User Guide) and to determine which ports to expose to...显示全部
The EXPOSE instructions informs Docker that the container will listen on the specified network ports at runtime. Docker uses this information to interconnect containers using links (see the Docker User Guide) and to determine which ports to expose to the host when using the -P flag.
    Note: EXPOSE doesn’t define which ports can be exposed to the host or make ports accessible from the host by default. To expose ports to the host, at runtime, use the -p flag or the -P flag.

以上为官方解释。我对你的问题不太明白,EXPOSE这个参数只能用来监听指定的端口,不涉及到IP相关。请参考一下官方的解释。收起
文化教育其它 · 2015-07-15
浏览3803
胶东牛国磊胶东牛国磊系统架构师百度游戏
回复 3# xbj8160690     不客气,互相学习 :)显示全部
回复 3# xbj8160690


    不客气,互相学习 :)收起
文化教育其它 · 2015-07-15
浏览5877
xbj8160690xbj8160690系统工程师111
知道了 谢谢你~显示全部
知道了 谢谢你~收起
互联网服务 · 2015-07-15
浏览3889

提问者

xbj8160690
系统工程师111

相关问题

相关资料

问题状态

  • 发布时间:2015-07-15
  • 关注会员:1 人
  • 问题浏览:8433
  • 最近回答:2015-07-15
  • X社区推广