title: How to set up connection between Docker containers using AWS Beanstalk and Spring Cloud Netflix
body: <p>My app consists of several microservices. 
  I want to use NetFlix Eureka as discovery server and I want to deploy my apps as Docker containers. I want to set up communication between my services, but there are few problems:</p>
  
  <ol>
  <li>Beanstalk always using nginx as reverse-proxy for container and by default routes all requests to port 80. Ok, I've beaten that using some tricky script.</li>
  <li>I have several network interfaces on my EC2 Beanstalk instance - docker0 which is bridge for docker and eth0 which is host IP. The problem is, that I cannot dynamically determine host IP address inside the container so I cannot pass it to the Eureka discovery server (which is also running as a Docker image) without hardcoding. Using code or configuration I can only expose internal Docker interface and not bridged.</li>
  </ol>
  
  <p>So, bottom line - I want to build microservices-enabled application using Docker, Beanstalk and Eureka. Solution should be scalable and there shouldn't be any hardcoded values except of Eureka host IP's.</p>
  
  <p>Thanks.</p>