Skip to content

Commit

Permalink
Dockerfile - ownership and permission
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelberston committed Nov 19, 2024
1 parent a9a3fc3 commit 18a2732
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ COPY --chown=appuser:appgroup . .

# Set ownership and permissions
RUN mkdir logs && \
chown -R appuser:appgroup /auth-server/logs && \
chown -R appuser:appgroup /auth-server && \
chmod -R 550 /auth-server && \
chmod -R 770 /auth-server/logs

chmod -R 770 /auth-server/logs && \
chmod 660 /auth-server/package.json && \
chmod 660 /auth-server/package-lock.json

# Switch to non-root user
USER appuser

Expand Down

0 comments on commit 18a2732

Please sign in to comment.