jorge07 / alpine-php

Multi Arch Alpine PHP Docker images. 5.6, 7{0,1,2,3,4}, 8.{1,2,3}
https://hub.docker.com/r/jorge07/alpine-php/
Apache License 2.0
129 stars 54 forks source link

Add support to change user group, id #33

Closed davidmpaz closed 7 years ago

davidmpaz commented 7 years ago

Hi thanks for this package,

I have reviewed some already and I like very much. But I have a problem that, after some debugging I think is related to permissions.

The original problem is this:

2017/10/22 07:30:01 [error] 7#7: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 172.29.0.1, server: pinky.local, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://172.29.0.2:9000", host: "dev.local"

and in front end, nginx give me an error of File not found. when file is actually there.

Please notice that my setup is working for a dev environment, I want only to change images (production ready small images) to test docker-compose deployment in production. Because of this, i noticed the permission issue in my files inside containers, all of them have userid == 1000, same as for dev containers.

That's the reason why I am requesting the possibility to change userid in your container. Similar issue is this: chrootLogin/docker-nextcloud#3

thanks in advance David

jorge07 commented 7 years ago

Hi David. I never found that problem, but the support for the user and group it's something in the roadmap. Can you provide some steps to reproduce that in my local?

davidmpaz commented 7 years ago

Ok,

thanks for answering ... i feel silly now. Even when the initial request can be valid, I don't think that for your production images, which are the ones I was trying, you should change anything in that direction.

By trying to wrap a sample project for this issue I just noticed my mistake was in a wrong mapping of volumes, I was trying to map volumes in fpm and in nginx, after I start using volumes_from directive in nginx error is solved.

Thanks for taking time on this and sorry for wasting it ^ ^. I will close since this is not relevant anymore.

cheers

jorge07 commented 7 years ago

You came with good news at least. Anyway I think move to a non root in containers should be a good idea. Let's see I've time next week for this.

Thanks!