diff --git a/Dockerfile b/Dockerfile index 839116d..73735fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -# build stage +# Build stage FROM --platform=$BUILDPLATFORM node:22-alpine3.20 AS build-stage ENV PNPM_HOME="/pnpm" ENV PATH="$PNPM_HOME:$PATH" -RUN corepack enable -RUN corepack use pnpm@9 + +RUN corepack enable && corepack prepare pnpm@9 --activate WORKDIR /app @@ -14,15 +14,15 @@ RUN pnpm install --frozen-lockfile COPY . . RUN pnpm build -# production stage +# Production stage FROM alpine:3.20 -ENV GID 1000 -ENV UID 1000 -ENV PORT 8080 -ENV SUBFOLDER "/_" -ENV INIT_ASSETS 1 -ENV IPV6_DISABLE 0 +ENV GID=1000 \ + UID=1000 \ + PORT=8080 \ + SUBFOLDER="/_" \ + INIT_ASSETS=1 \ + IPV6_DISABLE=0 RUN addgroup -S lighttpd -g ${GID} && adduser -D -S -u ${UID} lighttpd lighttpd && \ apk add -U --no-cache lighttpd