title: nginx.conf with bitnami nginx debian as base image for docker
body: <p>I am trying to dockerize my angular app. When I go to the web page, everything works fine until I refresh the page (F5). When I used nginx:1.17.1-alpine as the base image, I fixed the problem by using the following nginx.conf file instead of the nginx.conf default file:</p>
  <pre><code>server {
  listen       4200;
  server_name  localhost;
  
  location / {
      root   /usr/share/nginx/html;
      try_files $uri $uri/ /index.html;
      index  index.html index.htm;
  }
  
  error_page   500 502 503 504  /50x.html;
  location = /50x.html {
      root   /usr/share/nginx/html;
  }}
  </code></pre>
  <p>My dockerfile looked like that:</p>
  <pre><code>FROM nginx:1.17.1-alpine
  
  RUN rm /etc/nginx/conf.d/default.conf
  COPY nginx.conf /etc/nginx/conf.d/default.conf
  
  COPY /dist/frontend /usr/share/nginx/html
  EXPOSE 4200
  </code></pre>
  <p>However now I need to use bitnami/nginx:1.21.6-debian-10-r88 as my base image.
  When I try to build the container, I get the following error:</p>
  <pre><code>RUN rm /etc/nginx/conf.d/default.conf:
  #15 0.399 rm: cannot remove '/etc/nginx/conf.d/default.conf': No such 
  file or directory
  </code></pre>
  <p>Anyone can help me figure out how to build the container properly?</p>