docker-hugo/Dockerfile

23 lines
471 B
Docker
Raw Normal View History

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 && \
2024-05-02 08:21:57 +00:00
wget $(lastversion --filter "hugo_extended_.*\-${HUGO_ARCH}\.tar\.gz$" --pre gohugoio/hugo --format assets ) -O - | tar xzv -C /tmp
2024-05-02 07:48:54 +00:00
##### final image
2024-05-02 08:21:57 +00:00
FROM alpine:latest
2024-05-02 07:48:54 +00:00
2024-05-02 08:21:57 +00:00
COPY --from=prep /tmp/hugo /usr/local/bin/hugo
2022-10-02 14:55:45 +00:00
2023-02-14 00:37:57 +00:00
RUN \
2024-05-02 08:21:57 +00:00
apk --no-cache upgrade && \
apk --no-cache add gcompat
2023-02-14 00:37:57 +00:00
ENTRYPOINT [ "/usr/local/bin/hugo" ]