mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 23:26:20 +00:00
Use non root user for docs Dockerfile
This commit is contained in:
+9
-5
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user