|
|
@@ -26,18 +26,19 @@ COPY . .
|
|
|
RUN pnpm build
|
|
|
|
|
|
# ---------- runner ----------
|
|
|
-FROM base AS runner
|
|
|
+FROM node:20-alpine AS runner
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
|
|
-RUN pnpm add -g serve
|
|
|
+# install serve LOCAL (not global)
|
|
|
+RUN npm config set registry https://mirror2.chabokan.net/npm/
|
|
|
+RUN npm install -g serve
|
|
|
|
|
|
COPY --from=builder /app/dist ./dist
|
|
|
|
|
|
-RUN addgroup -S nodejs
|
|
|
-RUN adduser -S reactjs -G nodejs
|
|
|
+RUN addgroup -S nodejs && adduser -S reactjs -G nodejs
|
|
|
|
|
|
USER reactjs
|
|
|
|