20 lines
625 B
Docker
20 lines
625 B
Docker
FROM ghcr.io/gohugoio/hugo:v0.142.0 as builder
|
|
|
|
COPY --chown=hugo:hugo .git .git
|
|
COPY --chown=hugo:hugo content content
|
|
COPY --chown=hugo:hugo data data
|
|
COPY --chown=hugo:hugo go.mod go.mod
|
|
COPY --chown=hugo:hugo hugo.yaml hugo.yaml
|
|
COPY --chown=hugo:hugo i18n i18n
|
|
COPY --chown=hugo:hugo layouts layouts
|
|
COPY --chown=hugo:hugo static static
|
|
COPY --chown=hugo:hugo themes themes
|
|
RUN [ "/usr/bin/hugo", "mod", "get", "-u" ]
|
|
RUN [ "/usr/bin/hugo", "build", "--minify" ]
|
|
|
|
|
|
|
|
FROM docker.io/svenstaro/miniserve:alpine
|
|
COPY --from=builder /project/public /data
|
|
|
|
CMD [ "--index", "index.html", "/data" ]
|