How to run an nginx container as non root? How to run an nginx container as non root? nginx nginx

How to run an nginx container as non root?


You can remove (or comment) the user directive at the top of your nginx.conf file.

This directive is relevant when you run nginx as root. It defines the user possessing the pid of your nginx subprocesses.

When you don't run nginx as root this directive is irrelevant, your nginx subprocesses run with your current user.