Use a non-root user to limit root access in docker
I'd like to be able to deploy the netbird dashboard to a highly restricted environment. One of the requirements is to run docker as non-root. See also the best practices mentioned here. While it is possible to simply start the netbird dashboard container with another user it is not able to run since it is configured to:
- bind to ports lower than 1000 which are privileged ports.
- Writes files to /etc/, e.g. /etc/crontabs/root
- Letsencrypt bot writes to several places as well
I have tested to run the image in my environment and I am fairly confident that it should run somewhere else, too. I did not test running it with letsencrypt. This should be definitely tested before considering this to be merged.
This feature was asked for in #406. Consider this a first shot in this direction.
Any progress?
Hi @heisbrot , Could you take a look this PR?
I would love to see this implemented! Right now I need to run all my containers as root, which is a security issue for me.