title: "No such file or directory" immediately after creating it
body: <h2>Some background...</h2>
  
  <p>I am trying to build a Docker image for a Ghost blog. I am just adding one module: a Storage Adapter so that images are hosted on S3 instead of local filesystem (default setting).</p>
  
  <p>In the README of the <a href="https://github.com/colinmeinke/ghost-storage-adapter-s3" rel="nofollow noreferrer">storage adapter plugin</a>, the installation instructions are to copy the module into the working directory of the app:</p>
  
  <pre><code>npm install ghost-storage-adapter-s3
  mkdir -p ./content/adapters/storage
  cp -r ./node_modules/ghost-storage-adapter-s3 ./content/adapters/storage/s3
  </code></pre>
  
  <p>and that works -- but only <strong>inside</strong> of the container. I want to run these steps in the Docker build, so that if my container restarts, I don't lose these changes.</p>
  
  <h2>The issue</h2>
  
  <p>In my Dockerfile, I have: </p>
  
  <pre><code>FROM ghost:3
  RUN npm install ghost-storage-adapter-s3
  RUN mkdir -p ./content/adapters/storage
  RUN cp -r ./node_modules/ghost-storage-adapter-s3/ ./content/adapters/storage/s3
  </code></pre>
  
  <p>and it throws this error: <code>cp: cannot create directory './content/adapters/storage/s3': No such file or directory</code></p>
  
  <p>When I take a step back and try to create one directory at a time and validate it was created, i.e.</p>
  
  <pre><code>RUN ls ./content
  RUN mkdir ./content/adapters
  RUN ls ./content/adapters
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>Step 8/10 : RUN ls ./content/adapters
   ---&gt; Running in c55848f39bb4
  ls: cannot access './content/adapters': No such file or directory
  The command '/bin/sh -c ls ./content/adapters' returned a non-zero code: 2
  </code></pre>
  
  <p>How is possible that there is "no such directory" after I just created it? </p>
  
  <p>I tried setting chmod permissions when I create the folder <code>mkdir -m 777 ./content/adapters</code>, and updating owner to my current user (root): <code>RUN chown -R root ./content</code> but no effect.</p>
  
  <p>I was able to get it to at least build by changing the <code>./</code> directory prefixes, but that puts /content in the app root which is not where they need to be. When I specify the full path <code>/var/lib/ghost/content/adapters/storage</code> I get the same error. It seems to be a permissions thing but I don't know.</p>
  
  <p>Any help would be greatly appreciated.</p>