mirror of
https://github.com/yamadashy/repomix.git
synced 2025-06-11 00:25:54 +03:00
fix(docker): Use root user to resolve /tmp directory access issue
This commit is contained in:
@@ -35,25 +35,18 @@ FROM node:24-alpine
|
|||||||
# Install git and ca-certificates (required by repomix for remote repository processing)
|
# Install git and ca-certificates (required by repomix for remote repository processing)
|
||||||
RUN apk add --no-cache git ca-certificates
|
RUN apk add --no-cache git ca-certificates
|
||||||
|
|
||||||
# Create non-root user
|
|
||||||
RUN addgroup -g 1001 -S nodejs && \
|
|
||||||
adduser -S nodejs -u 1001
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy built application
|
# Copy built application
|
||||||
COPY --from=builder --chown=nodejs:nodejs /app/dist ./dist
|
COPY --from=builder /app/dist ./dist
|
||||||
|
|
||||||
# Copy production dependencies
|
# Copy production dependencies
|
||||||
COPY --from=deps --chown=nodejs:nodejs /app/node_modules ./node_modules
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
|
|
||||||
# Set environment variables
|
# Set environment variables
|
||||||
ENV NODE_ENV=production \
|
ENV NODE_ENV=production \
|
||||||
PORT=8080
|
PORT=8080
|
||||||
|
|
||||||
# Switch to non-root user
|
|
||||||
USER nodejs
|
|
||||||
|
|
||||||
# Expose port
|
# Expose port
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user