GrahamDumpleton / mod_wsgi-docker

Docker images for Apache/mod_wsgi.
Apache License 2.0
72 stars 36 forks source link

Documentation about process owner #20

Closed bostrt closed 7 years ago

bostrt commented 7 years ago

Pulled from README:

Note that although your specific Python web application when run will run as the non root user www-data, the Apache server itself will initially start up as the root user. Some Docker runtime environments however may be set up so as to prohibit you running your container as the root user and require a non root user from the outset.

But in my container, I see the following processes running under root and whiskey:

root@8d5c6e93bd91:/app# ps aux 
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  2.0  0.0   4224   644 ?        Ss   18:09   0:00 tini -- mod_wsgi-express start-server --log-to-terminal --startup-log --port 80 app.wsgi
root        16  4.0  0.0  75044  5348 ?        S+   18:09   0:00 httpd (mod_wsgi-express) -f /tmp/mod_wsgi-localhost:80:0/httpd.conf -E /dev/stderr -DMOD_WSGI_MPM_ENABLE_EVENT_MODULE -DMOD_W
whiskey     18 15.2  0.3 317644 46596 ?        Sl+  18:09   0:00 (wsgi:localhost:80:0)    -f /tmp/mod_wsgi-localhost:80:0/httpd.conf -E /dev/stderr -DMOD_WSGI_MPM_ENABLE_EVENT_MODULE -DMOD_W
whiskey     19  0.0  0.0 145836  3904 ?        Sl+  18:09   0:00 httpd (mod_wsgi-express) -f /tmp/mod_wsgi-localhost:80:0/httpd.conf -E /dev/stderr -DMOD_WSGI_MPM_ENABLE_EVENT_MODULE -DMOD_W
root        33  2.0  0.0  21856  3656 ?        Ss   18:09   0:00 /bin/bash
root        48  0.0  0.0  19100  2620 ?        R+   18:09   0:00 ps aux

Did I misunderstand where the user www-data should be present?

GrahamDumpleton commented 7 years ago

The README is out of date, it now creates a special user whiskey and runs it as that rather than www-data.