ilvey252 opened a new issue #9156: URL: https://github.com/apache/dubbo/issues/9156
<!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy --> - [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate. 场景需求: 我在dubbo服务容器化时遇到一个问题。 **该容器化平台暂时只支持将宿主机的随机端口转发给容器的指定端口**。 比如dubbo provider进程在任意容器内启动后在容器内的端口需要是20880,而dubbo consumer访问容器内的dubbo provider需要通过宿主机的端口才能访问(容器拉起来的时候会随机分配一个端口,并将该端口映射容器的20880端口)。 问题: 我参考文档:https://github.com/apache/dubbo-samples/tree/b95ca08af9f207116ec70631559df4073fe4d75e/dubbo-samples-docker 使用DUBBO_PORT_TO_REGISTRY=宿主机的随机端口来实现,但是发现启动后容器内的dubbo provider的进程端口也变成了宿主机的随机端口,而非我指定的20880端口了。我当前使用的dubbo版本是2.7.13,查看源码里关于注册端口和绑定端口的逻辑(org.apache.dubbo.config.ServiceConfig.findConfigedPorts),发现从2.7.12开始注册端口和绑定端口被改成一致了,之前的版本允许注册端口和绑定端口不一致。 请问下2.7.12及以后的版本,如果需求上要求注册端口和绑定端口不一样,我该如果解决呢? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org