25 lines
555 B
Docker
25 lines
555 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 -rf /var/lib/apt/lists/ /tmp/hugo.deb
|
|
|
|
ENTRYPOINT [ "/usr/local/bin/hugo" ]
|