title: Nginx docker container on host network don't serve angular app
body: <p>My goal was to run <strong>angular app</strong> in container with <strong>nginx</strong>.
  I want the container with application to be in my host network.</p>
  
  <p>This is my Dockerfile:</p>
  
  <pre><code># Stage 1
  FROM node:10.11.0-alpine as node
  
  WORKDIR /usr/src/app
  
  COPY package*.json ./
  
  RUN npm ci
  
  COPY . .
  
  RUN npm run build
  
  # Stage 2
  FROM nginx:1.14-alpine
  
  COPY --from=node /usr/src/app/dist/gui /usr/share/nginx/html
  
  COPY ./nginx.conf /etc/nginx/conf.d/default.conf
  </code></pre>
  
  <p>nginx.conf:</p>
  
  <pre><code>server {
    listen 80;
    server_name 127.0.0.1;
    location / {
      root /usr/share/nginx/html;
      index index.html index.html;
      try_files $uri $uri/ /index.html =404;
    }
  
    location /api {
      proxy_pass http://localhost:8080/api;
    }
  }
  </code></pre>
  
  <p>And my docker-compose.yml file:</p>
  
  <pre><code>version: "3.5"
  
  services:
    gui:
      container_name: gui
      network_mode: "host"
      build:
          context: gui
  </code></pre>
  
  <p><code>$ docker-compose up</code> starts the container. 
  But there is nothing present on <strong>localhost:80</strong>.</p>
  
  <p>Where is the problem? Nginx do not serve application?</p>