mirror of
https://codeberg.org/superseriousbusiness/gotosocial.git
synced 2024-12-18 23:21:49 +03:00
15 lines
410 B
Text
15 lines
410 B
Text
|
# Use this image to build the executable
|
||
|
FROM golang:1.16-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
|