hugo-alpine-ext/Dockerfile
baalajimaestro c84f0fecba
Build hugo fully from source on alpine
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2023-04-14 16:04:11 +05:30

15 lines
302 B
Docker

FROM golang:1.20-alpine as builder
ARG HUGO_VERSION
ENV CGO_ENABLED=1
RUN apk add --no-cache git build-base && \
go install -tags extended github.com/gohugoio/hugo@v$HUGO_VERSION
FROM golang:1.20-alpine
RUN apk add libstdc++
COPY --from=builder /go/bin/hugo /go/bin/hugo
CMD ["/go/bin/hugo"]