docker-hugo/Dockerfile
paspo afc649d6c8
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
apt cleanup
2024-05-02 10:06:23 +02:00

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