SandpointsGitHook/vendor/github.com/tdewolff/minify/v2/Dockerfile
2021-03-20 23:21:23 +01:00

16 lines
438 B
Docker

# Use this image to build the executable
FROM golang:1.13-alpine AS compiler
WORKDIR $GOPATH/src/minify
COPY . .
RUN apk add --update --update-cache --no-cache git ca-certificates && \
GO111MODULES=on CGO_ENABLED=0 go build -ldflags "-s -w" -trimpath -o /bin/minify ./cmd/minify
# Final image containing the executable from the previous step
FROM alpine:3
COPY --from=compiler /bin/minify /bin/minify
ENTRYPOINT ["/bin/minify"]