Mount a windows path (cifs) in a voulme of a docker image

1

I have a windows file server and an Ubuntu machine which runs docker. Inside this docker there is a Nextcloud container. The /var/www/html inside ther Nextcloud container is mounted as volume on the Linux host. Now I want the files saved in my cloud are saved directly on my file server. So I tried:

sudo mount -t cifs -o user=user //192.168.1.100/files /var/lib/docker/volumes/interna_nextcloud/_data/data/User/files/

If I create a file on the host system in this directory, the file will be created on my fileserver. But I fail to create a file in the Nextcloud container. The owner of this directory is root. I tried to change it (on the host and on the container) with

chown www-data [...]/User/files

with no error code but also with no success, the owner stays root.

Is there a way to mount a Windows Samba directory inside a docker container with the host by docker volumes? The docker container does not have access to the file server network (and should not have)

Max R.

Posted 2018-05-18T12:00:14.263

Reputation: 11

No answers