FROM golang:1.13-buster as build RUN mkdir /go/src/app WORKDIR /go/src/app ADD go.mod go.sum /go/src/app RUN go get -d -v ./... ADD archiver /go/src/app/archiver RUN go build -o /go/bin/app ./archiver # Now copy it into our base image. FROM gcr.io/distroless/base-debian10 COPY --from=build /go/bin/app / CMD ["/app"]