add dockerfile to build doc

This commit is contained in:
Ruidy 2024-09-08 20:12:47 +02:00
parent e0fe93efaa
commit 88dce52921
No known key found for this signature in database
GPG key ID: E00F51288CB857CC

21
Dockerfile.doc Normal file
View file

@ -0,0 +1,21 @@
FROM golang:1.23-alpine AS builder
ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64
RUN apk -U upgrade --no-cache
RUN apk add hugo
WORKDIR /docs
COPY go.* ./
RUN go mod download
COPY . .
RUN hugo --gc --minify
FROM scratch
COPY --from=builder /docs/public /public