title: Docker: "lstat no such file or directory" error when building image. File is there
body: <p>I want to deploy a simple JS Boilerplate to Docker Cloud. I use a Dockerfile that I already used for a different Boilerplate and image. The Dockerfile is pretty simple. It is just based on the official nginx, adds two config files and then the output folder of my gulp boilerplate to the nginx root. So I copied it from the one directory to the new boilerplate since I want to try this one.</p>
  
  <p>The error I'm getting is this (last line)</p>
  
  <pre><code>Sending build context to Docker daemon 277.5 kB
  Step 1 : FROM nginx
   ---&gt; af4b3d7d5401
  Step 2 : MAINTAINER Ole Bjarnstroem
   ---&gt; Using cache
   ---&gt; f57bc23d9444
  Step 3 : ENV LANG en_US.UTF-8
   ---&gt; Using cache
   ---&gt; f6f4a76092dd
  Step 4 : COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
   ---&gt; Using cache
   ---&gt; c4f83a39ba73
  Step 5 : COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
   ---&gt; Using cache
   ---&gt; 6fe5a6b61d9f
  Step 6 : ADD ./dist /usr/share/nginx/html
  lstat dist: no such file or directory
  </code></pre>
  
  <p>But the dist folder is there. </p>
  
  <pre><code>.
  ├── Dockerfile
  ├── JSCS.intellij.formatter.xml
  ├── README.md
  ├── app
  ├── dist
  ├── gulpfile.babel.js
  ├── jspm.conf.js
  ├── jspm_packages
  ├── karma.conf.js
  ├── nginx
  ├── node_modules
  ├── package.json
  ├── tsconfig.json
  ├── tslint.json
  ├── typings
  └── typings.json
  </code></pre>
  
  <p>It might be noteworthy that the folder to be copied was called <code>./public</code> So I could imagine that this is some kind of weird Docker Cache issue.</p>
  
  <p>My Dockerfile:</p>
  
  <pre><code>FROM nginx
  
  ENV LANG en_US.UTF-8
  
  # Copy configuration files
  COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
  COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
  
  # Add Gulp output folder to server root
  ADD ./dist /usr/share/nginx/html
  
  # Port configuration
  EXPOSE 8080
  </code></pre>
  
  <p>What I tried so far:</p>
  
  <ul>
  <li>Deleting dangling and unused images </li>
  <li>Deleting the image that was produced by the same docker file before </li>
  <li>Using a different tag</li>
  </ul>
  
  <p>My build command:</p>
  
  <pre><code>docker build -t my_repo/my_app .
  </code></pre>
  
  <p>Thanks for your help!</p>
  
  <p><strong>Edit:</strong> Every other folder works. It is also not a problem of file permissions. It seems, that Docker just <a href="https://github.com/brikis98/hello-startup-site/issues/8">doesn't like the dist folder</a>. Which sucks. </p>