I'm running Ubuntu 19.10 as my host OS.
I've ran into an issue where the user id and the group id of the www-data user/group are different on my host and in the nextcloud containers. This makes it difficult to move the data directory.
In order to get this to work I had to do the following:
- Get UID/GID for the www-data user in the nextcloud docker container
- Create data dir on the host
- Create a user/group on the host with the UID/GID of the www-data user from the nextcloud docker container (82:82 in my case)
- Change ownership of the data directory to the user/group created in step 3.
- recreate the docker-containers