updated
This commit is contained in:
+5
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user