title: Can't get config files when run ConfigServer and EurekaServer on docker container
body: <p>[Spring boot Microservies]</p>
  
  <p>I have a microservices includes 2 services: ConfigService and DiscoveryService</p>
  
  <ul>
  <li><strong>ConfigService</strong> is enabled ConfigServer, keep files config for microservice</li>
  <li><strong>DiscoveryService</strong> is EurekaServer. It will get config file from ConfigService</li>
  </ul>
  
  <p>When run 2 service on local (not docker), everything is good</p>
  
  <pre><code>Fetching config from server at: http://localhost:8088
  Located environment: name=epl-discovery-service, profiles=[default], label=null, version=3f6887b5b355381341e02ad03615f2415d6a566d, state=null
  Located property source: CompositePropertySource {name='configService', propertySources=[MapPropertySource {name='configClient'}, MapPropertySource {name='https://github.com/stomer90/epl-config-server.git/epl-discovery-service.yml'}]}
  No active profile set, falling back to default profiles: default
  </code></pre>
  
  <p>but when run 2 service on 2 container (docker), ConfigService run normal, but DiscoveryService have <strong>some error</strong> (can not connect to ConfigService)</p>
  
  <pre><code>Fetching config from server at: http://localhost:8088
  Could not locate PropertySource: I/O error on GET request for "http://localhost:8088/epl-discovery-service/default": Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused)
  No active profile set, falling back to default profiles: default
  </code></pre>
  
  <ul>
  <li><strong>ConfigService</strong></li>
  </ul>
  
  <p>EplConfigServiceApplication.java</p>
  
  <blockquote>
    <p>Blockquote</p>
  </blockquote>
  
  <pre><code>@SpringBootApplication
  @EnableConfigServer
  public class EplConfigServiceApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(EplConfigServiceApplication.class, args);
      }
  }
  </code></pre>
  
  <p>bootstrap.yml</p>
  
  <pre><code>server:
    port: 8088
  
   spring:
    application:
      name: eplconfigserver
  
    cloud:
      config:
        server:
          git:
            uri: https://github.com/stomer90/epl-config-server.git
  </code></pre>
  
  <p>Dockerfile</p>
  
  <pre><code>FROM openjdk:8-jdk-alpine
  
  MAINTAINER Phong Nguyen
  
  VOLUME /tmp
  
  # Add Spring Boot app.jar to Container
  ADD ./target/epl-config-service-0.0.1-SNAPSHOT.jar app.jar
  
  RUN sh -c 'touch /app.jar'
  
  ENV JAVA_OPTS=""
  ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar " ]
  </code></pre>
  
  <p><strong>* DiscoveryService</strong></p>
  
  <p>EplDiscoveryServiceApplication.java</p>
  
  <pre><code>@SpringBootApplication
  @EnableEurekaServer
  public class EplDiscoveryServiceApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(EplDiscoveryServiceApplication.class, args);
      }
  }
  </code></pre>
  
  <p>bootstrap.yml</p>
  
  <pre><code>spring:
    application:
      name: epl-discovery-service
    cloud:
      config:
        uri: http://localhost:8088
  </code></pre>
  
  <p>Dockerfile</p>
  
  <pre><code>FROM openjdk:8-jdk-alpine
  
  MAINTAINER Phong Nguyen
  
  VOLUME /tmp
  
  # Add Spring Boot app.jar to Container
  ADD ./target/epl-discovery-service-0.0.1-SNAPSHOT.jar app.jar
  
  RUN sh -c 'touch /app.jar'
  
  ENV JAVA_OPTS=""
  ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]
  </code></pre>
  
  <ul>
  <li><strong>Docker-compose.yml</strong></li>
  </ul>
  
  <blockquote>
  <pre><code>version: '3.1'
  
  services:
    epl-config-service:
      build: ./epl-config-service
      ports:
        - "8088:8088"
      restart:
        unless-stopped
  
  
    epl-discovery-service:
      build: ./epl-discovery-service
      ports:
        - "8061:8061"
      environment:
        - REGISTRY_HOST=epl-config-service
      depends_on:
        - epl-config-service
      restart:
        unless-stopped
  </code></pre>
  </blockquote>
  
  <p>Link source code: <a href="https://github.com/stomer90/epl-spring-cloud-microservice" rel="nofollow noreferrer">https://github.com/stomer90/epl-spring-cloud-microservice</a></p>
  
  <p>Please help me resolve this issue</p>