diff --git a/Dockerfile b/Dockerfile index 1700bce..0abc179 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,18 @@ # Stage 1: Build the Hugo site FROM alpine:3.19 AS builder -# Install Hugo -RUN apk add --no-cache hugo +# Install dependencies +RUN apk add --no-cache wget tar jq curl + +# Install latest Hugo extended version +RUN LATEST_RELEASE=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | jq -r '.tag_name') && \ + VERSION=${LATEST_RELEASE#v} && \ + echo "Installing latest Hugo version: $VERSION" && \ + wget https://github.com/gohugoio/hugo/releases/download/${LATEST_RELEASE}/hugo_extended_${VERSION}_linux-amd64.tar.gz -O hugo.tar.gz && \ + tar -xzf hugo.tar.gz -C /usr/local/bin/ && \ + rm hugo.tar.gz && \ + chmod +x /usr/local/bin/hugo && \ + hugo version # Set the working directory in the container WORKDIR /src