24 lines
525 B
Docker
24 lines
525 B
Docker
##### this stage will download latest deb package
|
|
|
|
FROM alpine:latest as prep
|
|
|
|
ARG HUGO_ARCH=amd64
|
|
|
|
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 && \
|
|
DEBIAN_FRONTEND=noninteractive apt -y upgrade && \
|
|
apt install -y /tmp/hugo.deb && rm /tmp/hugo.deb
|
|
|
|
ENTRYPOINT [ "/usr/local/bin/hugo" ]
|