Hi.
Docker has to standard environment variables PUID and GUID. These are meant to be used to allow one to select the user and group for the containers main process. This is a great help when you share volumes with a container that has specific user/group permissions. However this is not being used by the NextCloud docker image for some reason and I had to make an entrypoint wrapper to fix it on my setup.
#!/bin/bash
groupadd --gid $GUID nextcloud >/dev/null 2>/dev/null
useradd --uid $PUID --gid $GUID nextcloud --system >/dev/null 2>/dev/null
sed -i 's/^User .*/User nextcloud/' /etc/apache2/apache2.conf
sed -i 's/^Group .*/Group nextcloud/' /etc/apache2/apache2.conf
/entrypoint.sh "$@"
Using the www-data user may be fine for a small closed container, but it really is not very useful when sharing volumes with the host.
Hi.
Docker has to standard environment variables
PUIDandGUID. These are meant to be used to allow one to select the user and group for the containers main process. This is a great help when you share volumes with a container that has specific user/group permissions. However this is not being used by the NextCloud docker image for some reason and I had to make an entrypoint wrapper to fix it on my setup.Using the
www-datauser may be fine for a small closed container, but it really is not very useful when sharing volumes with the host.