coreos-home-server/service/hugo/Containerfile
Alex Palaistras a99e97abfe hugo: Switch to webhook-based builder
This commit switches Hugo to a webhook-based building process, with
support for Github, Gitlab, and Gitea hooks (including local versions of
Gitea) initially. In addition, Hugo-based sites are now intended to be
served under a single volume, with ingress configuration pointing to
sub-paths into the volume.

Documentation for webhook setup and NGINX proxy configuration is still
underway, and will be filled in later.
2022-10-28 17:52:05 +01:00

26 lines
849 B
Docker

FROM docker.io/golang:1.19-bullseye AS builder
WORKDIR /build
ENV GOBIN=/build/bin
RUN go install github.com/adnanh/webhook@latest
FROM docker.io/debian:bullseye-slim
ARG VERSION=0.104.3
RUN apt-get update -y && apt-get install -y --no-install-recommends \
ca-certificates curl git gettext gosu openssh-client
RUN curl -L https://github.com/gohugoio/hugo/releases/download/v${VERSION}/hugo_${VERSION}_Linux-64bit.tar.gz | \
tar -C /bin --no-same-owner -xvzf - hugo && chmod +x /bin/hugo
RUN apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false curl
RUN addgroup --system --gid 10000 hugo
RUN adduser --system --uid 10000 --ingroup hugo --no-create-home hugo
COPY --from=builder /build/bin/webhook /bin/webhook
COPY container/config /etc/hugo
COPY container/run-hugo /run-hugo
ENTRYPOINT ["/run-hugo"]