ByteInternet / hypernode-docker

Fast and easy Docker for Magento development
https://community.hypernode.io/hypernode-docker
35 stars 9 forks source link

[Feature req.] Set UID for App user. #15

Closed AngelsDustz closed 6 years ago

AngelsDustz commented 6 years ago

When mounting the Hypernode Docker as it the App user has UID 1001, how ever on an average linux install with only 1 user the UID will be 1000, which is currently used by Mailhog.

This gives file permission errors when installing a clean magento 2 box. (As the php-fpm/nginx is executed under UID 1001 (?)) I wrote a small script to change the UID of app but this still leaves these issues.

I wondered if there was a way to implement something that allowed us to set the App's UID to 1000. Or maybe a hint into a way of doing this is good too. I couldn't get the id mapping to work when volume mounting the docker box.

vdloo commented 6 years ago

This is because in the docker we install mailhog before creating the app user, which will then create the mailhog user with uid/gid 1000. We'll fix this in the image.

vdloo commented 6 years ago

this is fixed now btw:

root@9a577e6f8015 /etc/nginx # id app
uid=1000(app) gid=1000(app) groups=1000(app),4(adm),999(mysql),119(varnish)
AngelsDustz commented 6 years ago

Sweet, thank you!