title: Dockerfile: Copied file not found
body: <p>I'm trying to add a shell script to a container, and then run it as part of my build.</p>
  
  <p>Here's the relevant section of the dockerfile:</p>
  
  <pre><code>#phantomjs install
  COPY conf/phantomjs.sh ~/phantomjs.sh
  RUN chmod +x ~/phantomjs.sh &amp;&amp; ~/phantomjs.sh
  </code></pre>
  
  <p>And here's the output during the build:</p>
  
  <pre><code>Step 16 : COPY conf/phantomjs.sh ~/phantomjs.sh
   ---&gt; Using cache
   ---&gt; 8199d97eb936
  Step 17 : RUN chmod +x ~/phantomjs.sh &amp;&amp; ~/phantomjs.sh
   ---&gt; Running in 3c7ecb307bd3
  [91mchmod: [0m[91mcannot access '/root/phantomjs.sh'[0m[91m: No such file or directory[0m[91m
  </code></pre>
  
  <p>the file I'm copying exists in the conf folder underneath the build directory... but whatever I do it doesn't seem to be copied across.</p>