Skip to content

Conversation

@RinZ27
Copy link

@RinZ27 RinZ27 commented Jan 5, 2026

Dropped root privileges in the production Docker image. Running the app process as a dedicated memos user instead of root to minimize the potential impact if the process is compromised. Standard hardening practice.

Also updated the directory creation and ownership to ensure the memos user has proper access to its data volumes.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements Docker security hardening by dropping root privileges in the production container image. The application now runs as a dedicated non-root memos user, following container security best practices to minimize the attack surface if the process is compromised.

Key Changes:

  • Created a dedicated memos system user and group in the Alpine-based Docker image
  • Set proper ownership of application and data directories for the memos user
  • Switched the container runtime context to the non-root user

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@RinZ27
Copy link
Author

RinZ27 commented Jan 5, 2026

Good catch. Updated the Dockerfile to use explicit UID/GID 10001 for better predictability with volume mounts.

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.

1 participant