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
# Run as an unprivileged user rather than root.
RUN useradd --create-home --uid 1000 claude \
&& chown -R claude:claude /app
USER claude
# Run as an unprivileged user rather than root. The node:*-slim base image
# already ships a "node" user at uid 1000, so reuse it instead of creating
# a new one (useradd at the same uid fails with exit code 4, "UID in use").
RUN chown -R node:node /app
USER node
ENV NODE_ENV=production
EXPOSE 3000