title: Binary compiled in prestage doesn't work in scratch container
body: <p>I have a multi-stage Dockerfile that compiles netcat to use it in a scratch image later. (This has no particular use, but to test how this is done.)</p>
  
  <pre><code>FROM alpine:latest AS build
  RUN wget -q -O /root/netcat.tar.bz2 https://vorboss.dl.sourceforge.net/project/netcat/netcat/0.7.1/netcat-0.7.1.tar.bz2 &amp;&amp; \
  apk --no-cache add --update gcc g++ make
  WORKDIR /root/
  RUN tar xvjf /root/netcat.tar.bz2
  WORKDIR /root/netcat-0.7.1/
  RUN ./configure &amp;&amp; make &amp;&amp; make install
  
  FROM scratch # When using alpine here it works
  WORKDIR /bin/
  COPY --from=build /usr/local/bin/netcat /bin/netcat
  ENTRYPOINT ["/bin/netcat"]
  </code></pre>
  
  <p>When running this image I get the following error:</p>
  
  <pre><code>standard_init_linux.go:190: exec user process caused "no such file or directory"
  </code></pre>
  
  <p>The file is there because it works when using alpine as second image. When using busybox, I could use /bin/sh as entrypoint, but when executing netcat from that shell, it wouldn't work either.</p>
  
  <p>Do I have some problem of different architectures here? I don't know what is happening...</p>
  
  <p>Thanks</p>