These docker images assume the builtin UID/GID for www-data. But this breaks in situations where the uid/gid needs to be controlled and passed in via --user (for example when mounting NFS volumes that require a certain uid).
This is relatively easy to fix.. here is an example PR from a similar PHP+agache/nginx-fpm https://github.com/nextcloud/docker/pull/1278/files