Skip to content

run docker container as non-root #2060

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jaronoff97 opened this issue May 13, 2025 · 1 comment
Open

run docker container as non-root #2060

jaronoff97 opened this issue May 13, 2025 · 1 comment

Comments

@jaronoff97
Copy link

Current Behavior

The current Docker image creates and uses user sqld and root, which works fine for standard Docker deployments. However, when running in Kubernetes with security constraints like readOnlyRootFilesystem: true, we encounter permission issues because the container attempts to change ownership of files in the mounted volumes.

Proposal

Consider using a higher UID/GID in the range of 10000-65535 (specifically 10001 is commonly used in Kubernetes environments). This range is:

  • Less likely to conflict with host system users
  • Aligns with Kubernetes security best practices
  • Follows the practices of many official container images designed for Kubernetes

Use Case

In Kubernetes environments, especially those following security best practices, it's common to:

  • Run containers with readOnlyRootFilesystem: true
  • Use fsGroup for volume ownership rather than in-container chown
  • Avoid privileged containers or init containers when possible

Making the container work well in these environments would benefit users running in hardened Kubernetes clusters.

@jaronoff97
Copy link
Author

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

No branches or pull requests

1 participant