hugo-container/Containerfile
Nikolai Rodionov a496fe002f
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Add git to the hugo container again
2024-10-01 17:08:28 +02:00

21 lines
864 B
Docker

# ------------------------------------------------------------------------
# -- Copyright 2023 Nikolai Rodionov (allanger)
# ------------------------------------------------------------------------
FROM ghcr.io/allanger/dumb-downloader as builder
RUN apt-get update -y && apt-get install tar -y
ENV RUST_LOG=info
ARG HUGO_VERSION=0.135.0
ARG HUGO_OUTPUT=/tmp/hugo.tar.gz
RUN dudo -l "https://github.com/gohugoio/hugo/releases/download/v{{ version }}/hugo_extended_{{ version }}_{{ os }}-{{ arch }}.tar.gz" -d $HUGO_OUTPUT -p $HUGO_VERSION
RUN tar -xf $HUGO_OUTPUT -C /tmp && rm -f $HUGO_OUTPUT
RUN mkdir /out && mv /tmp/hugo /out/hugo
RUN chmod +x /out/hugo
FROM registry.hub.docker.com/library/debian
RUN apt-get update && apt-get install git -y
ENV HUGO_BIND=0.0.0.0
ENV HUGO_DESTINATION=public
COPY --from=builder /out/hugo /usr/bin/hugo
ENTRYPOINT ["hugo"]