title: Docker-compose ERR_NAME_NOT_RESOLVED (Java Spring + Angular)
body: <p>I have a two simple images:</p>
  
  <pre><code>#Angular image
  FROM node:12.2.0
  
  WORKDIR /app
  
  ENV PATH /app/node_modules/.bin:$PATH
  
  COPY package.json /app/package.json
  RUN npm install
  RUN npm install -g @angular/cli@7.3.9
  
  COPY . /app
  
  CMD ng serve 
  </code></pre>
  
  <p>&amp;</p>
  
  <pre><code># Java spring (REST) image
  FROM openjdk:8-jdk-alpine
  VOLUME /tmp
  COPY ./target/api-0.0.1-SNAPSHOT.jar app.jar
  ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar", "app.jar"]
  </code></pre>
  
  <p>And my docker-compose:</p>
  
  <pre><code>version: '3'
  
  services:
    web_app_speech:
      image: web_app_speech
      restart: always
      ports:
        - "4300:4200"
      depends_on: 
        - api_speech_docker
    api_speech_docker:
      image: api_speech_docker
      ports:
        - "8080:8080"
      restart: always
  </code></pre>
  
  <p>$> docker ps </p>
  
  <pre><code>CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
  15c719d31861        web_app_speech      "/bin/sh -c 'ng serv…"   9 minutes ago       Up 9 minutes        0.0.0.0:4300-&gt;4200/tcp   azure_web_app_speech_1
  044fd15f07e4        api_speech_docker   "java -Djava.securit…"   10 minutes ago      Up 9 minutes        0.0.0.0:8080-&gt;8080/tcp   azure_api_speech_docker_1
  </code></pre>
  
  <p>I can access my REST API from localhost:8080 and my web app from localhost:4300 without problem but when I try to perform a call from my web_app to my rest_api I have the following error:</p>
  
  <pre><code>OPTIONS http://api_speech_docker:8080/speech net::ERR_NAME_NOT_RESOLVED
  </code></pre>
  
  <p>I have no idea how to fix this, if you need more logs tell me !</p>
  
  <p>Thanks for your help </p>