drupal-docker / nginx

Dockerized NGINX for Drupal :droplet::whale:
https://hub.docker.com/r/drupaldocker/nginx/
MIT License
6 stars 9 forks source link

Fix unavailable www-data user for alpine, by using the nginx user #11

Closed gremy closed 8 years ago

gremy commented 8 years ago

When trying to use the alpine tag I am getting this error: [emerg] 1#1: getpwnam("www-data") failed in /etc/nginx/nginx.conf:1

After investingating the main nginx-alpine docker image I found that the nginx user and group are being created, so I changed it to use that instead of www-data

zaporylie commented 8 years ago

Hi

Thanks for point that out. I would personally opt for creating missing group and user (ref. http://blog.tobiasforkel.de/en/2016/09/10/nginx-docker-container-and-getpwnamwww-data-problem/). Having www-data in place would improve image's interoperability.

This is also how Docker solved that issue for php-alpine: https://github.com/docker-library/php/blob/master/5.6/alpine/Dockerfile#L27 https://github.com/docker-library/php/blob/d04f88956847d801bdd37f89dee747a7445a77a0/7.1/alpine/Dockerfile#L27

I'm curious about your opinion.

gremy commented 8 years ago

That works too. +1 from me

gremy commented 8 years ago

I amended my implementation. Please review again.