title: COPY not working with docker-compose but works find with docker build
body: <p>I am tasked with dockerizing an angular app and serve it with Nginx.</p>
  <p>I have built the angular project to a dist folder and want to move this folder to nginx-&gt;html directory in the built container along with other different microservices.</p>
  <p>This is how my docker project is structured</p>
  <pre><code> |-dist/
   |-Dockerfile
   |-dockerignore
   |-default.config
  </code></pre>
  <h2>Dockerfile</h2>
  <pre><code>FROM nginx
  
  #Remove default nginx website
  RUN rm -rf /usr/share/nginx/html/*
  
  COPY ./dist /usr/share/nginx/html
  
  COPY ./nginx.conf /etc/nginx/conf.d/default.conf
  </code></pre>
  <p>On top of this directory is a bunch of other services that need to run alongside the angular app which is all running as expected. With the following docker-compose.yml file</p>
  <h2>docker-compose.yml</h2>
  <pre><code>version: '3.2'
  services:
    adminportal:
      build: ./adminPortal
      ports:
        - &quot;80:80&quot;
      volumes:
        - &quot;/usr/share/nginx/html:/usr/share/nginx/html&quot;
        - &quot;/etc/nginx/conf.d:/etc/nginx/conf.d&quot;
  </code></pre>
  <p>When I build this container with docker build and run it runs as expected &quot;copying dist content to the right folder and copying the config to the right dir&quot;.
  But if build with <code>docker-compose up --build</code>, everything runs fine returning no error but it does not copy the files to their respective nginx folders.</p>