1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
FROM docker.io/library/golang:1.20 as builder WORKDIR /app COPY go.mod go.sum ./ RUN go mod download COPY . . RUN make build-static FROM scratch COPY --from=builder /app/dist/gdu /opt/gdu ENTRYPOINT ["/opt/gdu"]