title: Docker ENTRYPOINT/CMD cannot find file
body: <p>This is so bewildering. </p>
  
  <p>I have this simple Dockerfile, which uses npm install to install dependencies into node_modules:</p>
  
  <pre><code>FROM node:7
  
  RUN chmod -R 777 $(npm root -g)
  RUN mkdir -p /usr/src/app
  WORKDIR /usr/src/app
  
  COPY package.json .
  RUN npm install
  RUN npm install github:sumanjs/suman#rebase_branch
  
  COPY . .
  
  RUN (cd node_modules &amp;&amp; ls -a)  # 1 this logs expected stuff
  
  RUN (cd node_modules/suman &amp;&amp; ls -a)  # 2 this logs expected stuff
  
  CMD ["node","/usr/src/app/node_modules/suman/cli.js"]
  </code></pre>
  
  <p>it seems clear that the file is there after running </p>
  
  <pre><code>cd node_modules/suman &amp;&amp; ls -a
  </code></pre>
  
  <p>but for some reason I get an error:</p>
  
  <pre><code>module.js:472
      throw err;
      ^
  
  Error: Cannot find module '/usr/src/app/node_modules/suman/cli.js'
      at Function.Module._resolveFilename (module.js:470:15)
      at Function.Module._load (module.js:418:25)
      at Module.runMain (module.js:605:10)
      at run (bootstrap_node.js:427:7)
      at startup (bootstrap_node.js:151:9)
      at bootstrap_node.js:542:3
  </code></pre>
  
  <p>If I use ENTRYPOINT instead like so:</p>
  
  <pre><code>ENTRYPOINT ["/usr/src/app/node_modules/suman/cli.js"]
  </code></pre>
  
  <p>(cli.js has a hashbang)</p>
  
  <p>I get a similar error:</p>
  
  <pre><code>container_linux.go:262: starting container process caused "exec: \"/usr/src/app/node_modules/suman/cli.js\": stat /usr/src/app/node_modules/suman/cli.js: no such file or directory"
  docker: Error response from daemon: oci runtime error: container_linux.go:262: starting container process caused "exec: \"/usr/src/app/node_modules/suman/cli.js\": stat /usr/src/app/node_modules/suman/cli.js: no such file or directory".
  ERRO[0001] error waiting for container: context canceled 
  </code></pre>
  
  <p>This is very strange to me, I have used Docker for awhile now, and haven't seen anything like this before. Anyone know what might be up? It seems pretty clear that the file is missing, but I cannot figure out for the life of me why that would be. Especially considering when I use <code>ls -a</code>, the file appears to be present.</p>
  
  <p>To prove it to you, this is the output of the second ls -a command:</p>
  
  <pre><code>Step 10/11 : RUN (cd node_modules/suman &amp;&amp; ls -a)
   ---&gt; Running in 0715d56e23a9
  .
  ..
  .babelrc
  .npmignore
  .tscmultiwatch
  README.md
  cli
  cli.d.ts
  cli.js       &lt;&lt;&lt; dis my file
  config
  dist
  dts
  examples
  lib
  package.json
  scripts
  webpack.config.js
  </code></pre>
  
  <p>how bizarre.</p>