title: Issue with Docker multi-stage builds
body: <p>I have an issue with a multi-stage build where the binary that is being built in stage one is properly copied to stage 2, but when you try and run it the executable cannot be found.</p>
  
  <p>The dockerfile is:</p>
  
  <pre><code>FROM golang as goimage
  ENV SRC=/go/src/
  RUN mkdir -p /go/src/
  WORKDIR /go/src/go_docker
  RUN git clone https://github.com/bryonbaker/simple-microservice.git /go/src/go_docker/ \
  &amp;&amp; CGO_ENABLED=0 GOOS=linux GOARCH=amd64
  RUN go get github.com/gorilla/mux
  RUN go build -o bin/go_docker
  
  FROM alpine:latest AS microservice
  RUN apk --no-cache add bash
  ENV WORK_DIR=/docker/bin
  WORKDIR $WORK_DIR
  COPY --from=goimage /go/src/go_docker/bin/ ./
  
  # Put a container-image version identifier in the root directory.
  ARG VERSION=1.0
  RUN echo $VERSION &gt; image_version
  
  EXPOSE 10000
  #CMD ["go_docker"]
  </code></pre>
  
  <p>The result is:</p>
  
  <blockquote>
    <p>$ docker run -ti -p 80:10000 go-docker:latest<br>
    /docker/bin # ls</p>
    
    <p>go_docker      image_version<br>
    /docker/bin # ./go_docker   /bin/sh:
    ./go_docker: not found<br>
    /docker/bin #</p>
  </blockquote>
  
  <p>If I run the binary from the intermediate goimage container that is built then it runs fine. The file sizes match...</p>
  
  <p>NOTE: In this dockerfile I have commented out CMD and am testing via a shell. If you uncomment the CMD you get the same problem:</p>
  
  <blockquote>
    <p>docker run go-docker:latest docker: Error response from daemon: OCI
    runtime create failed: container_linux.go:344: starting container
    process caused "exec: \"go_docker\": executable file not found in
    $PATH": unknown. 
    ERRO[0001] error waiting for container: context canceled</p>
  </blockquote>
  
  <p>I have made the test code in the git repo public if you want to look at it.</p>
  
  <p>Thanks in advance</p>