-1

I use spring clound eureka feign create application.

I can run them in localhost, but when I run them in Docker, the feign can not call the service registered in eureka.

How can feign contact eureka when run in a docker container?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
wei wang
  • 49
  • 3
  • 1
    Welcome to SO. Please have a look to http://stackoverflow.com/help/how-to-ask to improve your chance to get a useful answer. – Henry Nov 26 '16 at 13:24

1 Answers1

0

First, as mentioned in spring-cloud-samples/feign-eureka, this assumes eureka (from spring-cloud-samples) is running on http://localhost:8761.
Eureka has a Docker image built from this Dockerfile.

Second, check from where you want to access localhost, because the port (even if published) will be only visible in the Docker host. Depending on your OS, the docker host might not be the actual physical host, which will then require port forwarding (like here for boot2docker for instance).

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250