Dockerfiles run services as the root user #1729

Closed
opened 2025-10-09 17:27:26 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @xhalo32 on GitHub.

Subject of the issue

Shouldn't use the root user to run the services inside the containers.

https://medium.com/@mccode/processes-in-containers-should-not-run-as-root-2feae3f0df3b

Originally created by @xhalo32 on GitHub. <!-- Please fill out the following template to make solving your problem easier and faster for us. This is only a guideline. If you think that parts are unneccessary for your issue, feel free to remove them. Remember to hide/obfuscate personal and confidential information, such as names, global IP/DNS adresses and especially passwords, if neccessary. --> ### Subject of the issue Shouldn't use the root user to run the services inside the containers. https://medium.com/@mccode/processes-in-containers-should-not-run-as-root-2feae3f0df3b
Author
Owner

@BlackDex commented on GitHub:

Thx for the updated wiki, closing this issue.

@BlackDex commented on GitHub: Thx for the updated wiki, closing this issue.
Author
Owner

@jjlin commented on GitHub:

As noted in https://github.com/dani-garcia/bitwarden_rs/pull/1014#issuecomment-637965744, this probably isn't a good default for bitwarden_rs, but I've now added documentation on how to run as non-root:

https://github.com/dani-garcia/bitwarden_rs/wiki/Hardening-Guide#run-as-a-non-root-user

@jjlin commented on GitHub: As noted in https://github.com/dani-garcia/bitwarden_rs/pull/1014#issuecomment-637965744, this probably isn't a good default for bitwarden_rs, but I've now added documentation on how to run as non-root: https://github.com/dani-garcia/bitwarden_rs/wiki/Hardening-Guide#run-as-a-non-root-user
Author
Owner

@jjlin commented on GitHub:

@Stampede10343 I didn't notice that page, but I think it has a few additional things that would be good to mention. I'll merge it into the hardening guide page tonight. Thanks for calling attention to that.

@jjlin commented on GitHub: @Stampede10343 I didn't notice that page, but I think it has a few additional things that would be good to mention. I'll merge it into the hardening guide page tonight. Thanks for calling attention to that.
Author
Owner

@Stampede10343 commented on GitHub:

As noted in #1014 (comment), this probably isn't a good default for bitwarden_rs, but I've now added documentation on how to run as non-root:

https://github.com/dani-garcia/bitwarden_rs/wiki/Hardening-Guide#run-as-a-non-root-user

Should this remove the listing here, since its basically the same, and better suited in the Hardening Guide, IMO.

@Stampede10343 commented on GitHub: > As noted in [#1014 (comment)](https://github.com/dani-garcia/bitwarden_rs/pull/1014#issuecomment-637965744), this probably isn't a good default for bitwarden_rs, but I've now added documentation on how to run as non-root: > > https://github.com/dani-garcia/bitwarden_rs/wiki/Hardening-Guide#run-as-a-non-root-user Should this remove the [listing here](https://github.com/dani-garcia/bitwarden_rs/wiki/Running-the-server-with-non-root-user), since its basically the same, and better suited in the Hardening Guide, IMO.
Author
Owner

@jjlin commented on GitHub:

It's updated now.

@jjlin commented on GitHub: It's updated now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#1729