Files
docker-hugo/Dockerfile
paspo bde1ce538e
All checks were successful
Container Publish / on-success-skip (push) Has been skipped
Container Publish / build-image (arm64) (push) Successful in 29s
Container Publish / build-image (amd64) (push) Successful in 42s
Container Publish / update docker manifest (push) Successful in 9s
added openssh-client
2025-10-13 10:17:05 +02:00

27 lines
838 B
Docker

##### this stage will download latest tarball
FROM alpine:latest AS prep
ARG HUGO_ARCH=amd64
RUN \
apk --no-cache upgrade && \
apk --no-cache add curl jq && \
LATEST_RELEASE=$(curl -L -s -H 'Accept: application/json' https://github.com/gohugoio/hugo/releases/latest | jq --raw-output ".tag_name" | sed 's/^v//' ) && \
echo "Using hugo release: ${LATEST_RELEASE}" && \
URL="https://github.com/gohugoio/hugo/releases/download/v${LATEST_RELEASE}/hugo_extended_${LATEST_RELEASE}_linux-${HUGO_ARCH}.tar.gz " && \
echo "Downloading: ${URL}" && \
wget "${URL}" -O - | tar xzv -C /tmp
##### final image
FROM alpine:latest
COPY --from=prep /tmp/hugo /usr/local/bin/hugo
RUN \
apk --no-cache upgrade && \
apk --no-cache add rsync openssh-client git gcompat libstdc++
ENTRYPOINT [ "/usr/local/bin/hugo" ]