Spring boot Eureka in docker swarm registering wrong internal docker ip's

Docker nodes are registering with inter ip’s in springboot-eureka My conf is as follows 1. Spring-boot eureka deployed to swarm (1 node) 2. Created spring-boot client containers (2nodes) and registering with eureka

The above containers are deployed as separate deployments, and the client conf is as follows

eureka:
  instance:
    prefer-ip-address: true
  client:
    registerWithEureka: true
    fetchRegistry: true
    serviceUrl:
      defaultZone: http://eureka-server-address/eureka/
    healthcheck:
       enabled: true
Spring:
  cloud:
    inetutils:
      ignored-interfaces:
      - eth0
      - eth1
      - eth2
      - eth3
      - lo

the ip’s come as 172.1.0.1 instead of real-external ip’s. and docker containers fail to connect each other with the real ip’s.

Hi I am also facing the same issue , did you find the solution ?