feature(DOCKERFILE): set up nginx to run as non-root
- add libcap - use setcap (via libcap) to allow nginx to bind to ports <1024 - set permissions on nginx directories - change nginx pid location to /etc/nginx
This commit is contained in:
@@ -2,9 +2,8 @@
|
||||
### NGINX main configuration
|
||||
#
|
||||
|
||||
user www-docker;
|
||||
worker_processes 1;
|
||||
pid /var/run/nginx.pid;
|
||||
pid /etc/nginx/nginx.pid;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
|
||||
@@ -12,13 +11,13 @@ error_log /var/log/nginx/error.log warn;
|
||||
include /etc/nginx/modules/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 512;
|
||||
worker_connections 1024;
|
||||
multi_accept off;
|
||||
use epoll;
|
||||
}
|
||||
|
||||
http {
|
||||
server_names_hash_bucket_size 512;
|
||||
server_names_hash_bucket_size 128;
|
||||
default_type application/octet-stream;
|
||||
charset utf-8;
|
||||
include /etc/nginx/mime.types;
|
||||
|
||||
Reference in New Issue
Block a user