Nextcloud image with /var/www/html/data 770


I am trying to install nextcloud in openshift but it freezes because of a folder rights check.
I read a couple of topics on this but would not work for me:

If I create an image with with either chmod 770 /var/www/html/data
or with deactivated the folder check (there is an option in a config file in conf folder the installation remains frozenā€¦

I also tried to create a Dockerfile based on nextcloud and try to modify the above folders (or config file) but I cannot, as the do not exist yet!
As I said, If I do run the image and change them after, the installation remains frozenā€¦

Any ideas?