title: "prefer-ip-address" of Eureka client not work in docker container
body: <p>I have a Spring Cloud Eureka client instance running inside docker, and I would like the client to register itself the host's IP address rather than the container's hostname to the Eureka server, so I set <code>eureka.instance.ip-address: xx.xx.xx.xx</code> and <code>eureka.instance.prefer-ip-address: true</code> to the client's <code>application.yml</code>, but that does not work, it still registers the container's hostname to the server, any help is appreciated!</p>
  
  <pre><code>spring:
    application:
      name: uaa-service
  server:
    port: 8799
  
  eureka:
    service-url:
      defaultZone: https://XX.YY.ZZ/eureka/
    instance:
      prefer-ip-address: true
      ip-address: xx.xx.xx.xx
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/YOBpG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YOBpG.png" alt="screenshot"></a>
  My Spring Boot version is <code>2.0.0.RELEASE</code> and Spring Cloud being <code>Finchley.M9</code>.</p>