The hostname should be different cause the localhost inside of a docker container is referring to the docker container itself, and if you want to make sure that your Eureka is visible by other containers(your microservices) you can set up a network and bind you Eureka server to 8761:8761