This commit is contained in:
2026-09-28 16:33:22 +02:00
parent d8ee832b0a
commit f6ed92be1c
+5 -4
View File
@@ -17,10 +17,11 @@ RUN npm install --omit=dev --no-audit --no-fund || true
COPY src ./src COPY src ./src
# Run as an unprivileged user rather than root. # Run as an unprivileged user rather than root. The node:*-slim base image
RUN useradd --create-home --uid 1000 claude \ # already ships a "node" user at uid 1000, so reuse it instead of creating
&& chown -R claude:claude /app # a new one (useradd at the same uid fails with exit code 4, "UID in use").
USER claude RUN chown -R node:node /app
USER node
ENV NODE_ENV=production ENV NODE_ENV=production
EXPOSE 3000 EXPOSE 3000