title: Docker "executable file not found in $PATH" even though it is added to the path in the base image?
body: <p>I would like to adapt this image, <a href="https://hub.docker.com/r/micromdm/scep" rel="nofollow noreferrer">https://hub.docker.com/r/micromdm/scep</a>, to run the <code>scepclient</code> rather than the <code>scepserver</code>. The <code>Dockerfile</code> for the image is:</p>
  
  <pre><code>FROM alpine:3.6
  
  COPY ./build/scepserver-linux-amd64 /usr/bin/scepserver
  COPY ./build/scepclient-linux-amd64 /usr/bin/scepclient
  
  EXPOSE 8080
  
  ENTRYPOINT ["scepserver"]
  </code></pre>
  
  <p>I would like the <code>ENTRYPOINT</code> to be <code>["scepclient"]</code> instead of <code>["scepserver"]</code>, which I attempted to do using the following <code>Dockerfile</code>:</p>
  
  <pre><code>FROM micromdm/scep
  
  ENTRYPOINT ["scepclient"]
  </code></pre>
  
  <p>However, if I build this using <code>docker build . --tag loadtest</code> and try to run it I get the following error:</p>
  
  <pre><code>&gt; docker run loadtest
  docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"scepclient\": executable file not found in $PATH": unknown.
  </code></pre>
  
  <p>I thought that executables added to your <code>PATH</code> in the base image (<code>micromdm/scep</code>) would also be available in the 'derived' image, but this seems not to be the case, and I wasn't able to get much of a better understanding of this from <a href="https://docs.docker.com/engine/reference/builder/#from" rel="nofollow noreferrer">https://docs.docker.com/engine/reference/builder/#from</a>. </p>
  
  <p>How can I use the <code>micromdm/scep</code> image but run <code>scepclient</code> instead of <code>scepserver</code>?</p>