docker file
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user