diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 034271eb..abe4faee 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -5,6 +5,7 @@ RUN set -ex; \ \ apk add --no-cache \ rsync \ + shadow \ ; \ \ rm /var/spool/cron/crontabs/root; \ diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 5a580142..0396c4aa 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -19,6 +19,13 @@ run_as() { fi } +if [ -n "${NEXTCLOUD_UID+x}" ]; then + usermod -u "$NEXTCLOUD_UID" www-data +fi +if [ -n "${NEXTCLOUD_GID+x}" ]; then + groupmod -g "$NEXTCLOUD_GID" www-data +fi + installed_version="0.0.0.0" if [ -f /var/www/html/version.php ]; then # shellcheck disable=SC2016