Skip to content

fix: properly reference pod's securityContext from values and add deployment.securityContext.runAsNonRoot=true#197

Closed
vmignot wants to merge 3 commits intodocker-mailserver:masterfrom
vmignot:master
Closed

fix: properly reference pod's securityContext from values and add deployment.securityContext.runAsNonRoot=true#197
vmignot wants to merge 3 commits intodocker-mailserver:masterfrom
vmignot:master

Conversation

@vmignot
Copy link
Copy Markdown

@vmignot vmignot commented Mar 5, 2026

The securityContext from the deployment was referencing a non-existing value. It was never applied.

@vmignot vmignot requested a review from funkypenguin as a code owner March 5, 2026 09:19
@vmignot vmignot closed this Mar 5, 2026
@cfis
Copy link
Copy Markdown
Collaborator

cfis commented Mar 5, 2026

Did you want me to look at this, or did you change you mind?

@vmignot
Copy link
Copy Markdown
Author

vmignot commented Mar 6, 2026

Did you want me to look at this, or did you change you mind?

I looked further into it, and, as the container is running as root, I think my PR would break the deployment.
We should remove the parameter from the values, more likely - as it is not used, and should not be used from my understanding.

@polarathene
Copy link
Copy Markdown
Member

The white-space fixes would probably be good to get in as a clean-up.

DMS needs to run as root to do it's thing as it's a multi-process container and the root user manages those users during setup, such as correcting permissions/ownership of files.

Our process manager (supervisor) then launches each service potentially as a non-root user or as a root user where the service itself runs other parts with it's own non-root user for security.


So no it shouldn't run as non-root. What you can do is run the container as rootless I think (this is different and keeps the internal user as root, but on the container host it maps to a user ID above 2^16 for security, with Docker that requires running the daemon in rootless mode).

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