title: containerizing angular app with nginx "no such file or directory"
body: <p>Im trying to deploy my angular app using google cloud run in an docker container.</p>
  <p>My dockerfile looks like this:</p>
  <pre><code># stage 1
  
  FROM node:alpine AS my-app-build
  WORKDIR /app
  COPY . .
  RUN npm ci &amp;&amp; npm run build
  
  # stage 2
  
  FROM nginx:alpine
  COPY --from=my-app-build /app/dist /usr/share/nginx/html
  EXPOSE 8080
  </code></pre>
  <p>And it seems that i have tried one milion different approaches to the dockerfile but i think this one is the one that have gotten me furthest.
  Here is the docker logs:</p>
  <pre><code>/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
  
  /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
  
  /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
  
  10-listen-on-ipv6-by-default.sh: Getting the checksum of /etc/nginx/conf.d/default.conf
  
  10-listen-on-ipv6-by-default.sh: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
  
  /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
  
  /docker-entrypoint.sh: Configuration complete; ready for start up
  
  2020/11/20 20:23:49 [error] 29#29: *3 open() &quot;/usr/share/nginx/html/usr/share/nginx/html&quot; failed (2: No such file or directory), client: 172.17.0.1, server: localhost, request: &quot;GET /usr/share/nginx/html HTTP/1.1&quot;, host: &quot;localhost:9000&quot;
  
  172.17.0.1 - - [20/Nov/2020:20:23:49 +0000] &quot;GET /usr/share/nginx/html HTTP/1.1&quot; 404 555 &quot;-&quot; &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36&quot; &quot;-&quot;
  
  2020/11/20 20:23:54 [error] 29#29: *5 open() &quot;/usr/share/nginx/html/html&quot; failed (2: No such file or directory), client: 172.17.0.1, server: localhost, request: &quot;GET /html HTTP/1.1&quot;, host: &quot;localhost:9000&quot;
  
  172.17.0.1 - - [20/Nov/2020:20:23:54 +0000] &quot;GET /html HTTP/1.1&quot; 404 555 &quot;-&quot; &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36&quot; &quot;-&quot;
  </code></pre>
  <p>Here is my file-structure:</p>
  <p><a href="https://i.stack.imgur.com/H84Ok.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/H84Ok.png" alt="enter image description here" /></a></p>
  <p>Please help with this! I'm about to run bald with this container thing....</p>
  <p>When I open the browser I get this:</p>
  <p><a href="https://i.stack.imgur.com/v3Qgr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v3Qgr.png" alt="enter image description here" /></a></p>