title: Docker entrypoint not found although in PATH (and executable)
body: <p>I am creating a simple image with the following <code>Dockerfile</code></p>
  
  <pre><code>FROM docker:latest
  
  COPY docker-entrypoint.sh /usr/local/bin
  
  ENTRYPOINT ['docker-entrypoint.sh']
  </code></pre>
  
  <p>Inside my container:</p>
  
  <pre><code>/ # ls -al $(which docker-entrypoint.sh)
  -rwxrwxr--    1 root     root           476 Jul 26 07:30 /usr/local/bin/docker-entrypoint.sh
  </code></pre>
  
  <p>So the entrypoint file is <strong>both</strong> in the <code>PATH</code> <strong>and</strong> executable;</p>
  
  <p>But when running</p>
  
  <pre><code>docker run -v /var/run/docker.sock:/var/run/docker.sock -it imageinit
  /bin/sh: [docker-entrypoint.sh]: not found
  </code></pre>
  
  <p>I am aware of <a href="https://stackoverflow.com/questions/44460825/entrypoint-file-not-found">this SO question</a>, but this is about the problem of <code>PATH</code> and file permissions (already addressed);</p>