title: .dockerignore not ignoring any files
body: <p>My <code>.dockerignore</code> file isn't doing anything, and I can't seem to find what I am doing wrong. </p>
  
  <p>I have <code>Dockerfile</code>, <code>docker-compose.yml</code> and <code>.dockerignore</code> all within the root of the project. </p>
  
  <p><code>.yml</code>:</p>
  
  <pre><code>version: "3.5"
  services:
  
    gateway:
      build: .
      ...
  </code></pre>
  
  <p><code>Dockerfile</code>:</p>
  
  <pre><code>FROM php:7-fpm-alpine
  
  EXPOSE 10091
  
  WORKDIR /root
  COPY . .
  </code></pre>
  
  <p><code>.dockerignore</code>:</p>
  
  <pre><code>.ash_history
  .env.*
  .git
  .gitignore
  .idea
  Dockerfile
  docker-compose.yml
  client
  </code></pre>
  
  <p>I have tried specifying a single file in case my formatting is bad, but it still didn't do anything. I have also tried deleting the image and creating it again (even though I am using a <code>docker-compose up -d --build</code> each time).</p>
  
  <p>I suppose that <code>COPY</code> action from the <code>Dockerfile</code> executes after the ignoring of files takes place?</p>