2024-05-02 07:48:54 +00:00
|
|
|
##### this stage will download latest deb package
|
|
|
|
|
|
|
|
FROM alpine:latest as prep
|
2022-10-02 14:55:45 +00:00
|
|
|
|
2023-02-14 00:46:59 +00:00
|
|
|
ARG HUGO_ARCH=amd64
|
2022-12-26 10:42:13 +00:00
|
|
|
|
2024-05-02 07:48:54 +00:00
|
|
|
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
|
2022-10-02 14:55:45 +00:00
|
|
|
|
2023-02-14 00:37:57 +00:00
|
|
|
RUN \
|
2024-05-02 07:14:07 +00:00
|
|
|
apt update && \
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt -y upgrade && \
|
2023-02-14 00:37:57 +00:00
|
|
|
apt install -y /tmp/hugo.deb && rm /tmp/hugo.deb
|
|
|
|
|
|
|
|
ENTRYPOINT [ "/usr/local/bin/hugo" ]
|