2022-10-28 16:47:34 +00:00
|
|
|
FROM docker.io/golang:1.19-bullseye AS builder
|
|
|
|
|
|
|
|
WORKDIR /build
|
|
|
|
ENV GOBIN=/build/bin
|
|
|
|
|
|
|
|
RUN go install github.com/adnanh/webhook@latest
|
|
|
|
|
2022-04-18 17:07:20 +00:00
|
|
|
FROM docker.io/debian:bullseye-slim
|
2022-10-28 16:47:34 +00:00
|
|
|
ARG VERSION=0.104.3
|
2022-04-18 17:07:20 +00:00
|
|
|
|
|
|
|
RUN apt-get update -y && apt-get install -y --no-install-recommends \
|
2022-10-28 16:47:34 +00:00
|
|
|
ca-certificates curl git gettext gosu openssh-client
|
2022-04-18 17:07:20 +00:00
|
|
|
|
2022-10-28 16:47:34 +00:00
|
|
|
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
|
2022-04-18 17:07:20 +00:00
|
|
|
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
|
|
|
|
|
2022-10-28 16:47:34 +00:00
|
|
|
COPY --from=builder /build/bin/webhook /bin/webhook
|
|
|
|
COPY container/config /etc/hugo
|
2022-04-18 17:07:20 +00:00
|
|
|
COPY container/run-hugo /run-hugo
|
2022-10-28 16:47:34 +00:00
|
|
|
|
2022-04-18 17:07:20 +00:00
|
|
|
ENTRYPOINT ["/run-hugo"]
|