FROM golang:1.19.2-alpine3.16 as builder COPY . /app WORKDIR /app RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \ go build FROM scratch CMD ["/app"]