FROM docker.io/golang:1.20.4-alpine3.18 as builder SHELL ["/bin/ash", "-eo", "pipefail", "-c"] WORKDIR /usr/src ARG VERSION RUN wget -qO- https://github.com/tdewolff/minify/archive/refs/tags/v${VERSION}.tar.gz | tar xzf - WORKDIR /usr/src/minify-${VERSION} RUN go install ./cmd/minify FROM scratch COPY --from=builder /go/bin/minify /usr/local/bin