diff --git a/Dockerfile b/Dockerfile index ad48e6f..636dbfc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,19 @@ -FROM debian:12-slim +##### this stage will download latest deb package + +FROM alpine:latest as prep -ARG HUGO_VERSION=0.111.3 ARG HUGO_ARCH=amd64 -ADD "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-${HUGO_ARCH}.deb" /tmp/hugo.deb +RUN \ + apk -U add lastversion && \ + wget $(lastversion --filter "hugo_extended_.*\-${HUGO_ARCH}\.deb$" --pre gohugoio/hugo --format assets ) -O /tmp/hugo.deb + + +##### final image + +FROM debian:12-slim + +COPY --from=prep /tmp/hugo.deb /tmp/hugo.deb RUN \ apt update && \