feat: upgrade Hugo installation to use latest extended version from GitHub releases
This commit is contained in:
parent
e80e9a54fe
commit
3bde9f322c
14
Dockerfile
14
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user