docker-hugo/Dockerfile
paspo 1ac07c5704
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
force package update
2024-05-25 19:35:03 +02:00

25 lines
577 B
Docker

##### this stage will download latest deb package
FROM alpine:latest as prep
ARG HUGO_ARCH=amd64
RUN \
apk --no-cache upgrade && \
apk --no-cache add lastversion && \
URL=$(lastversion --filter "hugo_extended_.*\-${HUGO_ARCH}\.tar\.gz$" --pre gohugoio/hugo --format assets) && \
echo "Downloading: ${URL}" && \
wget "${URL}" -O - | tar xzv -C /tmp
##### final image
FROM alpine:latest
COPY --from=prep /tmp/hugo /usr/local/bin/hugo
RUN \
apk --no-cache upgrade && \
apk --no-cache add gcompat libstdc++
ENTRYPOINT [ "/usr/local/bin/hugo" ]