2023-12-18 20:32:55 +00:00
|
|
|
FROM docker.io/thegeeklab/alpine:latest@sha256:735da7d38631fe2ad663fa519ca0f1940c3cfc3888f80bc71be8dc95f982c62c
|
2021-05-06 20:31:39 +00:00
|
|
|
|
|
|
|
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
|
|
|
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
|
|
|
LABEL org.opencontainers.image.title="Hugo static site generator"
|
2023-11-08 08:02:35 +00:00
|
|
|
LABEL org.opencontainers.image.url="https://gitea.rknet.org/container/hugo"
|
|
|
|
LABEL org.opencontainers.image.source="https://gitea.rknet.org/container/hugo"
|
|
|
|
LABEL org.opencontainers.image.documentation="https://gitea.rknet.org/container/hugo"
|
2021-05-06 20:31:39 +00:00
|
|
|
|
2023-11-08 08:02:35 +00:00
|
|
|
ARG TARGETOS
|
|
|
|
ARG TARGETARCH
|
|
|
|
ARG TARGETVARIANT
|
|
|
|
|
|
|
|
ARG HUGO_VERSION
|
2021-05-06 20:31:39 +00:00
|
|
|
|
|
|
|
# renovate: datasource=github-releases depName=gohugoio/hugo
|
2024-01-04 19:50:30 +00:00
|
|
|
ENV HUGO_VERSION="${HUGO_VERSION:-v0.121.1}"
|
2021-05-06 20:31:39 +00:00
|
|
|
|
2021-05-06 20:40:23 +00:00
|
|
|
ENV HUGO_ENV=production
|
|
|
|
|
2021-05-06 20:31:39 +00:00
|
|
|
COPY overlay/ /
|
|
|
|
|
|
|
|
RUN apk add --update --no-cache --virtual .build-deps tar curl && \
|
2023-06-23 07:15:18 +00:00
|
|
|
apk add --update --no-cache gcompat libc6-compat libstdc++ busybox-suid bash bash-completion git tzdata make asciidoctor && \
|
2021-05-06 20:31:39 +00:00
|
|
|
echo "Installing hugo version '${HUGO_VERSION##v}' ..." && \
|
2023-11-08 08:02:35 +00:00
|
|
|
curl -SsfL "https://github.com/gohugoio/hugo/releases/download/${HUGO_VERSION}/hugo_extended_${HUGO_VERSION##v}_${TARGETOS}-${TARGETARCH}.tar.gz" | \
|
2021-05-06 20:31:39 +00:00
|
|
|
tar xz -C /usr/local/bin hugo && \
|
|
|
|
chmod 755 /usr/local/bin/hugo && \
|
|
|
|
apk del .build-deps && \
|
|
|
|
rm -rf /var/cache/apk/* && \
|
|
|
|
rm -rf /tmp/* && \
|
|
|
|
rm -rf /root/.cache/
|
|
|
|
|
|
|
|
USER root
|
|
|
|
CMD ["help"]
|
|
|
|
ENTRYPOINT ["/usr/local/bin/hugo"]
|