Skip to content

Conversation

@santib
Copy link
Member

@santib santib commented Oct 27, 2025

This commit implements the rootless user functionality for both production and development Docker images with all improvements from PR #837 review:

Changes made:

  • Added rootless user setup using 'rails' username (not 'rails_api_base')
  • Used ARG instead of ENV for USERNAME, USER_UID, and USER_GID build variables
  • Set proper file ownership and permissions (700) for security
  • Added explanatory comment for temporary root switch in jemalloc symlink creation
  • Applied --chown and --chmod flags to all COPY operations

Security improvements:

  • Application now runs as non-root user (UID/GID 1000)
  • Reduced attack surface by limiting privileges
  • Follows Docker security best practices

Files modified:

  • Dockerfile: Added rootless user for production image
  • Dockerfile.dev: Added rootless user for development image

🤖 Generated with Claude Code

Board:


Description:


Notes:


Tasks:

  • Add each element in this format

Risk:


Preview:

This commit implements the rootless user functionality for both production
and development Docker images with all improvements from PR #837 review:

Changes made:
- Added rootless user setup using 'rails' username (not 'rails_api_base')
- Used ARG instead of ENV for USERNAME, USER_UID, and USER_GID build variables
- Set proper file ownership and permissions (700) for security
- Added explanatory comment for temporary root switch in jemalloc symlink creation
- Applied --chown and --chmod flags to all COPY operations

Security improvements:
- Application now runs as non-root user (UID/GID 1000)
- Reduced attack surface by limiting privileges
- Follows Docker security best practices

Files modified:
- Dockerfile: Added rootless user for production image
- Dockerfile.dev: Added rootless user for development image

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@sonarqubecloud
Copy link

@santib santib closed this Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants