The local service cannot communicate with the docker content container through Feign

 本地服务通过Feign无法与docker内容器通讯问题
完成服务开发,在本地a,b两个项目之间注册同一个注册中心,能够通过Feign实现服务间的通讯,但是将其中一个服务发布到docker容器中(另一个服务器)且无法通讯,一直无法连接超时。
解决的方法很简单,就是把需要动态的值都当参数传递给spring boot 和 docker

docker run -d --name auxplat-helloworld --expose=6999 -p 6999:6999 -e "EUREKA_INSTANCE_IP-ADDRESS=100.100.20.214"
plus the blackened code, ip is the registry ip

Guess you like

Origin blog.csdn.net/qq_31142237/article/details/100565277