docker file

This commit is contained in:
Jake Kasper
2025-09-03 11:20:18 -04:00
parent c62da14a92
commit 1826bf2702
2 changed files with 9 additions and 15 deletions

View File

@@ -12,13 +12,10 @@ RUN npm install --silent
# Copy source code
COPY . .
# Create non-root user
RUN addgroup -g 1001 -S nodejs
RUN adduser -S turftracker -u 1001
# Change ownership of the app directory
RUN chown -R turftracker:nodejs /app
USER turftracker
# Use the pre-created non-root user from the Node image
# and ensure ownership is correct
RUN chown -R node:node /app
USER node
# Expose port
EXPOSE 3000