Split documentation for easier updates
This commit is contained in:
8
docs/UID_GID_Mapping.md
Normal file
8
docs/UID_GID_Mapping.md
Normal file
@@ -0,0 +1,8 @@
|
||||
## User / Group Identifiers
|
||||
Sometimes when using data volumes (`-v` flags) permissions issues can arise between the host OS and the container. We avoid this issue by allowing you to specify the user `PUID` and optionally the group `PGID`. Ensure the data volume directory on the host is owned by the same user you specify and it will "just work" ™.
|
||||
|
||||
An example of mapping the UID and GID to the container is as follows:
|
||||
```
|
||||
docker run -d -e "PUID=`id -u $USER`" -e "PGID=`id -g $USER`" -v local_dir:/var/www/html richarvey/nginx-php-fpm:latest
|
||||
```
|
||||
This will pull your local UID/GID and map it into the container so you can edit on your host machine and the code will still run in the container.
|
||||
Reference in New Issue
Block a user