1# Use this image to build the executable
2FROM golang:1.18-alpine AS build
3
4WORKDIR /go/src/github.com/tdewolff/minify
5COPY . /go/src/github.com/tdewolff/minify/
6
7RUN apk add --no-cache git ca-certificates make bash
8RUN /usr/bin/env bash -c make install
9
10
11# Final image containing the executable from the previous step
12FROM alpine:3
13
14COPY --from=build /go/bin/minify /usr/bin/minify
15COPY "containerfiles/container-entrypoint.sh" "/init.sh"
16
17ENTRYPOINT ["/init.sh"]