Update Dockerfile
This commit is contained in:
1 parent
e8ee4afb36
commit
f0e9be8343
1 file changed
+5
-4
@@ -35,15 +35,16 @@ RUN npm run build
|
|||||||
FROM node:20-alpine AS runner
|
FROM node:20-alpine AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install system dependencies first
|
# Install system dependencies (gcompat for glibc Hugo binary)
|
||||||
RUN apk add --no-cache git openssh-client su-exec
|
RUN apk add --no-cache git openssh-client su-exec gcompat
|
||||||
|
|
||||||
# Install specific Hugo version
|
# Install Hugo 0.128.2 extended
|
||||||
ARG HUGO_VERSION=0.128.2
|
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 && \
|
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 && \
|
tar -xzf /tmp/hugo.tar.gz -C /tmp && \
|
||||||
mv /tmp/hugo /usr/local/bin/hugo && \
|
mv /tmp/hugo /usr/local/bin/hugo && \
|
||||||
rm /tmp/hugo.tar.gz
|
rm /tmp/hugo.tar.gz && \
|
||||||
|
hugo version
|
||||||
|
|
||||||
# Create non-root user
|
# Create non-root user
|
||||||
RUN addgroup --system --gid 1001 nodejs && \
|
RUN addgroup --system --gid 1001 nodejs && \
|
||||||
|
|||||||
Reference in new issue
Block a user