docker暴露多个端口
以下是stackoverflow鬼老的回答: To expose just one port, this is what you need to do: 1 dockerrun-p<host_port>:<container_port> To expose multiple ports, simply provide multiple-parguments: 1 dockerrun-p<host_port1>:<container_port1>-p<host_port2>:<container_port2> 或者你可以直接桥接网络,然后在dockerfile上面直接expose你所需要的端口,这样可以免去-p参数。 本文转自 yanconggod 51CTO博客,原文链接:http://blog.51cto.com/yanconggod/1880348