How to migrate a NCP instance from RPi (normal install) to a docker setup on Intel Nuc?

Hey to you all,

I am currently trying to migrate my nextcloud instance from a Rpi to a docker setup on an Intel NUC. The RPi instance is running with the datadir on a external 2,5HDD that is connected to the Pi via USB3.
While setting up the docker instance without setting the datadir to the hdd is no problem and works out of the box, the problem starts with me trying to restore the ncp instance and get the external drive to work as the datadir in the docker setup.

This is my docker command for running ncp:

docker run -d -p 4443:4443 -p 2341:443 -p 2342:80 -v /ncpbackups:/ncpbackups -v /media/clouddrive/ncdata:/data --name nextcloudpi ownyourbits/nextcloudpi $192.168.2.49 --restart unless-stopped

As said above, if I use the standard datadir without the implementation of /media/… everything works and is initialized properly. But with the above command, the log gives me the following error and the inialization is aborted:

Starting PHP-fpm
Starting Apache
Starting mariaDB
2021-01-20 16:51:46 0 [Note] mysqld (mysqld 10.3.27-MariaDB-0+deb10u1) starting as process 93 …
2021-01-20 16:51:46 0 [Warning] Can’t create test file /data/database/132da70c645e.lower-test
mysqld: Can’t change dir to ‘/data/database/’ (Errcode: 2 “No such file or directory”)

I have no clue to what I’m doing wrong. Maybe you can help? The external drive is set up and mounted, i have chowned the directory to work with the ncp user. But nothing seems to solve my problem.

Looking forward to your replies!
Ruben