hugo-container/Containerfile

20 lines
819 B
Plaintext
Raw Permalink Normal View History

2023-05-30 07:29:15 +00:00
# ------------------------------------------------------------------------
# -- 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
2024-05-13 10:04:15 +00:00
ARG HUGO_VERSION=0.125.7
2023-05-30 07:29:15 +00:00
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
2023-05-30 07:29:15 +00:00
RUN tar -xf $HUGO_OUTPUT -C /tmp && rm -f $HUGO_OUTPUT
RUN mkdir /out && mv /tmp/hugo /out/hugo
RUN chmod +x /out/hugo
2023-09-29 08:34:06 +00:00
FROM registry.hub.docker.com/library/debian
ENV HUGO_BIND=0.0.0.0
ENV HUGO_DESTINATION=public
2023-05-30 07:29:15 +00:00
COPY --from=builder /out/hugo /usr/bin/hugo
ENTRYPOINT ["hugo"]