➜ ls -l src/vendor/
total 4
-rw-r--r--. 1 root root 178 Dec 6 15:27 autoload.php
drwxr-xr-x. 1 root root 22 Dec 6 15:26 bin
drwxr-xr-x. 1 root root 426 Dec 6 15:27 composer
We should be able to set the user and the group id that docker uses for the php-fpm container -- if we set these to the same user that's running docker-compose, then the file permissions should Just Work™.
Currently:
```
➜ ls -l src/vendor/
total 4
-rw-r--r--. 1 root root 178 Dec 6 15:27 autoload.php
drwxr-xr-x. 1 root root 22 Dec 6 15:26 bin
drwxr-xr-x. 1 root root 426 Dec 6 15:27 composer
```
We should be able to set the user and the group id that docker uses for the php-fpm container -- if we set these to the same user that's running docker-compose, then the file permissions should Just Work™.
Adding user: 1000:1000 to the php-fpm container "sort of works".
Two issues:
No way to parameterise this while using docker-compose, that's one of the things that has pushed other projects to using a Makefile
The php-fpm container's /etc/passwd doesn't contain an entry for UID 1000, so SSH (including git-over-ssh) doesn't work because it requires a properly-created home directory.
Solving #2 worsens #1 because the UID 1000 assumption is even more hard-coded if we create the user at image build time.
Solving #1 worsens 2 because it's even harder to add a user dynamically with an arbitrary UID (especially.. what if clashes?)
I am currently polling Autonomicans to find out how many people are using a non-1000 UID to see if we can maybe just continue with that default and improve it.
Adding `user: 1000:1000` to the php-fpm container "sort of works".
Two issues:
1. No way to parameterise this while using `docker-compose`, that's one of the things that has pushed other projects to using a Makefile
2. The php-fpm container's `/etc/passwd` doesn't contain an entry for UID 1000, so SSH (including git-over-ssh) doesn't work because it requires a properly-created home directory.
Solving #2 worsens #1 because the UID 1000 assumption is even more hard-coded if we create the user at image build time.
Solving #1 worsens 2 because it's even harder to add a user dynamically with an arbitrary UID (especially.. what if clashes?)
I am currently polling Autonomicans to find out how many people are using a non-1000 UID to see if we can maybe just continue with that default and improve it.
This repo is archived. You cannot comment on issues.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Currently:
We should be able to set the user and the group id that docker uses for the php-fpm container -- if we set these to the same user that's running docker-compose, then the file permissions should Just Work™.
https://newbedev.com/export-current-user-id-in-makefile-for-docker-compose
https://jtreminio.com/blog/running-docker-containers-as-current-host-user/
https://stackoverflow.com/a/66112924/14269772
Adding
user: 1000:1000to the php-fpm container "sort of works".Two issues:
docker-compose, that's one of the things that has pushed other projects to using a Makefile/etc/passwddoesn't contain an entry for UID 1000, so SSH (including git-over-ssh) doesn't work because it requires a properly-created home directory.Solving #2 worsens #1 because the UID 1000 assumption is even more hard-coded if we create the user at image build time.
Solving #1 worsens 2 because it's even harder to add a user dynamically with an arbitrary UID (especially.. what if clashes?)
I am currently polling Autonomicans to find out how many people are using a non-1000 UID to see if we can maybe just continue with that default and improve it.