title: Copying files to a container with Docker Compose
body: <p>I have a <code>Dockerfile</code> where I copy an existing directory (with content) to the container which works fine:</p>
  
  <p><strong>Dockerfile</strong></p>
  
  <pre><code>FROM php:7.0-apache
  COPY Frontend/ /var/www/html/aw3somevideo/
  COPY Frontend/ /var/www/html/
  
  RUN ls -al /var/www/html
  RUN chown -R www-data:www-data /var/www/html 
  RUN chmod -R 755 /var/www/html 
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/AXF1s.png" rel="noreferrer"><img src="https://i.stack.imgur.com/AXF1s.png" alt="Screenshot of directory listing with docker exec"></a></p>
  
  <p>But when I use a <code>docker-compose.yml</code> file there is only the directory <code>aw3somevideo</code> and inside <code>aw3somevideo</code> there is nothing.</p>
  
  <p><strong>docker-compose.yml</strong>:</p>
  
  <pre><code> php:
      build: php/
      volumes:
        - ./Frontend/ :/var/www/html/
        - ./Frontend/index.php :/var/www/html/
      ports:
        - 8100:80
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/TyMEq.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TyMEq.png" alt="Screenshot of empty directory listing"></a></p>
  
  <p>Maybe I do not understand the function of <code>volumes</code> and if that's the case please tell me how to copy my existing files to the container via a <code>docker-compose.yml</code> file.</p>