FROM golang:1.21-alpine3.19 AS builder # Install git and build GoReleaser RUN apk add --no-cache git && \ go install github.com/goreleaser/goreleaser@v1.21.2 FROM golang:1.21-alpine3.19 # Install build dependencies RUN apk add --no-cache \ build-base \ gcc \ musl-dev \ g++ \ mupdf \ mupdf-dev \ git \ curl \ bash \ linux-headers # Copy GoReleaser from builder COPY --from=builder /go/bin/goreleaser /usr/local/bin/goreleaser WORKDIR /src ENTRYPOINT ["goreleaser"]