Application registers in Eureka using IP instead of hostname when its Docker container publishes port Application registers in Eureka using IP instead of hostname when its Docker container publishes port docker docker

Application registers in Eureka using IP instead of hostname when its Docker container publishes port


by explicitly setting the hostname eureka.instance.hostname=${SOME_VAR} or ignoring certain interfaces:

From the documentation: The following configuration will ignore the "docker0" interface and all interfaces that start with "veth".

application.ymlspring:  cloud:    inetutils:      ignoredInterfaces:        - docker0        - veth.*

You can also force to use only specified network addresses using list of regular expressions:

application.ymlspring:  cloud:    inetutils:      preferredNetworks:        - 192.168        - 10.0