Is it possible to register with a custom ip?

86 views
Skip to first unread message

plu...@gmail.com

unread,
May 22, 2015, 4:53:29 AM5/22/15
to eureka_...@googlegroups.com
I'm using eureka in a Docker environment, which means that my clients automatically get an IP adress from inside the Docker VM.
But i don't want to link them to each other. I need them to register with the IP that is reachable from outside the Docker VM.

The only possibility that i see is to write the XML/JSON document that get's sent to Eureka myself, or am i missing something?

dl...@netflix.com

unread,
May 22, 2015, 1:05:21 PM5/22/15
to eureka_...@googlegroups.com, plu...@gmail.com
Hi,

The InstanceInfo constructed by the client for registration purposes is based on EurekaInstanceConfig. You can use a custom implementation of EurekaInstanceConfig that specifies your version of getIpAddress() to provide the desired ip address you want.

michas

unread,
May 26, 2015, 3:23:25 PM5/26/15
to eureka_...@googlegroups.com, plu...@gmail.com
Easiest solution would be using host-networking on your docker machines (may not suit your overall setup)

plu...@gmail.com

unread,
May 27, 2015, 4:19:57 AM5/27/15
to eureka_...@googlegroups.com, plu...@gmail.com
Thank you, that seems to be a sufficient solution.
Reply all
Reply to author
Forward
0 new messages