docs: add hugo site
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
parent
f7b3869062
commit
e2ae76f1f2
291 changed files with 2833 additions and 2 deletions
28
dockerfiles/docs.Dockerfile
Normal file
28
dockerfiles/docs.Dockerfile
Normal file
|
@ -0,0 +1,28 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
|
||||
ARG GO_VERSION=1.20.8
|
||||
ARG ALPINE_VERSION=3.18
|
||||
|
||||
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base
|
||||
RUN apk add --no-cache git
|
||||
|
||||
FROM base AS hugo
|
||||
ARG HUGO_VERSION=0.119.0
|
||||
RUN --mount=type=cache,target=/go/mod/pkg \
|
||||
go install github.com/gohugoio/hugo@v${HUGO_VERSION}
|
||||
|
||||
FROM base AS build-base
|
||||
COPY --from=hugo $GOPATH/bin/hugo /bin/hugo
|
||||
WORKDIR /src
|
||||
|
||||
FROM build-base AS build
|
||||
RUN --mount=type=bind,rw,source=docs,target=. \
|
||||
hugo --gc --minify --destination /out
|
||||
|
||||
FROM build-base AS server
|
||||
COPY docs .
|
||||
ENTRYPOINT [ "hugo", "server", "--bind", "0.0.0.0" ]
|
||||
EXPOSE 1313
|
||||
|
||||
FROM scratch AS out
|
||||
COPY --from=build /out /
|
Loading…
Add table
Add a link
Reference in a new issue