2024-01-11 14:42:33 +01:00
|
|
|
FROM golang:alpine AS builder
|
2024-11-26 09:09:05 +01:00
|
|
|
RUN apk update \
|
|
|
|
&& apk add --no-cache git \
|
|
|
|
&& apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community hugo
|
2024-01-11 14:42:33 +01:00
|
|
|
|
|
|
|
WORKDIR $GOPATH/src/www-jmbit-de
|
|
|
|
COPY . .
|
|
|
|
RUN go get -d -v
|
2024-11-26 09:09:05 +01:00
|
|
|
RUN hugo --minify
|
2024-11-26 09:25:38 +01:00
|
|
|
RUN go build -a -installsuffix cgo -ldflags="-w -s" -o /go/bin/www
|
2024-01-11 14:42:33 +01:00
|
|
|
|
|
|
|
FROM scratch
|
|
|
|
COPY --from=builder /go/bin/www /go/bin/www
|
|
|
|
ENTRYPOINT ["/go/bin/www"]
|