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
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user