docker-hugo/Dockerfile
paspo 4fb84bc0af
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
always build latest hugo
2024-05-02 09:48:54 +02:00

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" ]