title: Why won't my docker-entrypoint.sh execute?
body: <p>My <code>ENTRYPOINT</code> script doesn't execute and throws     <code>standard_init_linux.go:175: exec user process caused "no such file or directory"</code>. Why so?</p>
  
  <h1>Doesn't Work</h1>
  
  <pre><code>$ docker build -t gilani/trollo . &amp;&amp; docker run gilani/trollo
  Sending build context to Docker daemon   126 kB
  Step 1 : FROM vault:latest
   ---&gt; 1f127f53f8b5
  Step 2 : MAINTAINER Amin Shah Gilani &lt;gilani@payload.tech&gt;
   ---&gt; Using cache
   ---&gt; 86b885ca1c81
  Step 3 : COPY vaultConfig.json /vault/config
   ---&gt; Using cache
   ---&gt; 1a2be2fa3acd
  Step 4 : COPY ./docker-entrypoint.sh /
   ---&gt; Using cache
   ---&gt; 0eb7c1c992f1
  Step 5 : RUN chmod +x /docker-entrypoint.sh
   ---&gt; Running in 251395c4790f
   ---&gt; 46aa0fbc9637
  Removing intermediate container 251395c4790f
  Step 6 : ENTRYPOINT /docker-entrypoint.sh
   ---&gt; Running in 7434f052178f
   ---&gt; eca040859bfe
  Removing intermediate container 7434f052178f
  Successfully built eca040859bfe
  standard_init_linux.go:175: exec user process caused "no such file or directory"
  </code></pre>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM vault:latest
  
  MAINTAINER Amin Shah Gilani &lt;gilani@payload.tech&gt;
  
  COPY vaultConfig.json /vault/config
  
  COPY ./docker-entrypoint.sh /
  
  RUN chmod +x /docker-entrypoint.sh
  
  ENTRYPOINT ["/docker-entrypoint.sh"]
  </code></pre>
  
  <p>docker-entrypoint.sh:</p>
  
  <pre><code>#!/bin/bash
  
  echo 'Hello World!'
  </code></pre>
  
  <h1>Works</h1>
  
  <pre><code>$ docker build -t gilani/trollo . &amp;&amp; docker run gilani/trollo
  Sending build context to Docker daemon   126 kB
  Step 1 : FROM vault:latest
   ---&gt; 1f127f53f8b5
  Step 2 : MAINTAINER Amin Shah Gilani &lt;gilani@payload.tech&gt;
   ---&gt; Using cache
   ---&gt; 86b885ca1c81
  Step 3 : COPY vaultConfig.json /vault/config
   ---&gt; Using cache
   ---&gt; 1a2be2fa3acd
  Step 4 : ENTRYPOINT echo 'hello world'
   ---&gt; Using cache
   ---&gt; ef5792a1f252
  Successfully built ef5792a1f252
  'hello world'
  </code></pre>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM vault:latest
  
  MAINTAINER Amin Shah Gilani &lt;gilani@payload.tech&gt;
  
  COPY vaultConfig.json /vault/config
  
  ENTRYPOINT ["echo", "'hello world'"]
  </code></pre>