FROM golang:alpine as builder WORKDIR /src COPY results.go . RUN go mod init results RUN go get go.nanomsg.org/mangos/v3 RUN go mod tidy RUN go build -ldflags="-w -s" -o results results.go FROM scratch WORKDIR / COPY --from=builder /lib/ld-musl-*.so.1 /lib/ COPY --from=builder /src/results /usr/bin/ ENTRYPOINT [ "/usr/bin/results" ]