This commit is contained in:
Vaica committed 2026-06-21 23:58:29 +08:00
1 parent 92ecf6bba0
commit ed14361e7b
5 files changed
+86 -6

No files matched your search

+7 -2
View File
@@ -35,8 +35,13 @@ RUN npm run build
FROM node:20-alpine AS runner
WORKDIR /app
# Install Hugo and su-exec (for entrypoint)
RUN apk add --no-cache hugo su-exec
# Install specific Hugo version, git and su-exec
ARG HUGO_VERSION=0.128.2
RUN wget -q https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz -O /tmp/hugo.tar.gz && \
tar -xzf /tmp/hugo.tar.gz -C /tmp && \
mv /tmp/hugo /usr/local/bin/hugo && \
rm /tmp/hugo.tar.gz && \
apk add --no-cache git su-exec
# Create non-root user
RUN addgroup --system --gid 1001 nodejs && \