Use non root user for docs Dockerfile

This commit is contained in:
x032205
2025-07-11 14:47:22 -04:00
parent 74fae78c31
commit 2f6c79beb6
+9 -5
View File
@@ -19,13 +19,17 @@ FROM node:20-alpine
WORKDIR /app WORKDIR /app
RUN npm install -g [email protected] RUN addgroup -g 1001 -S mintuser && \
adduser -S -D -H -u 1001 -s /sbin/nologin -G mintuser mintuser && \
npm install -g [email protected]
COPY . . COPY --chown=mintuser:mintuser . .
COPY --from=builder /root/.mintlify /root/.mintlify COPY --from=builder --chown=mintuser:mintuser /root/.mintlify /home/mintuser/.mintlify
COPY --from=builder /app/docs.json /app/docs.json COPY --from=builder --chown=mintuser:mintuser /app/docs.json /app/docs.json
COPY --from=builder /app/spec.json /app/spec.json COPY --from=builder --chown=mintuser:mintuser /app/spec.json /app/spec.json
USER mintuser
EXPOSE 3000 EXPOSE 3000