title: Error in path to binary in multistage Dockerfile
body: <p>I'm lost at trying to get my executable to run in a multistage Dockerfile.</p>
  <p>I keep getting</p>
  <pre><code>&quot;Exec user process caused: no such file or directory unknown&quot;
  </code></pre>
  <p>errors relative to the path to the binary I've built in the first stage, so I know I'm referencing it wrong.</p>
  <p>Can anyone see where I'm going wrong? Does the <code>WORKDIR</code> argument apply to the second stage of the build, as well?</p>
  <pre><code>#####################################
  # PHASE 1: build an executable binary
  #####################################
  FROM golang:alpine AS builder
  WORKDIR /app
  COPY go.mod go.sum ./
  RUN go mod download
  COPY . .
  RUN go build -o server .
  
  #####################################
  # PHASE 2: build a small disk image
  #####################################
  FROM scratch
  COPY --from=builder /app/server /app/server
  EXPOSE 8000
  CMD [ &quot;/app/server&quot; ]
  </code></pre>