Skip to content

Change to no-root user in docker image by default #26418

@41tair

Description

@41tair

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

The current Docker image defaults to running as the root user. This poses a security risk and contradicts the principle of least privilege.

In many production and CI/CD environments, running containers as root is prohibited by security policies. For instance, Kubernetes clusters often enforce Pod Security Standards (like baseline or restricted profiles) that prevent containers from running as UID 0.

When we attempt to deploy this image in such an environment, the deployment is blocked by our security admission controllers. The current workaround is to manually override the security context for every deployment, which is cumbersome and not a scalable solution.

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions