Home
Sign Up
Sign In
›
Docker Engine Quickstart
›
Boot2docker
V2EX
›
Docker
使用动态端口的程序是不是不适合部署在 docker 上?
cirton
·
Jan 2, 2020
· 4567 views
This topic created in 2515 days ago, the information mentioned may be changed or developed.
程序对外的端口是动态的,这种情况下就没办法提前在 docker 上暴露端口,这种情况是不是不适合使用 docker 环境?
Docker
端口
动态
程序
4 replies
slwl123
Jan 2, 2020
1
使用 --net=host
cirton
OP
Jan 3, 2020
2
@
slwl123
这种只适合单节点的情况吧?现在搭建集群时,多个节点都需要暴露相同的端口,比如主机 A 和主机 B 都需要暴露 22 端口,这种模式是不是就不合适了?
XSG
Jan 3, 2020
3
可以参考 ftp 服务,把一定范围的端口暴露出去,比如 10000-10010
slwl123
Jan 3, 2020
4
@
cirton
#2 应该可以 但是每个 node 只能 运行一个 pod 并且 node 里的端口没被占用
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
2162 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 31ms ·
UTC 03:32
·
PVG 11:32
·
LAX 19:32
·
JFK 22:32
♥ Do have faith in what you're doing.
❯