0

I have a docker container, which is hosting jupyter notebook server on my PC, that has mounted directory from local host. Let's call this directory /docker-mount.

Next, I created new directory under the directory /docker-mount, like /docker-mount/files, and then I mounted some cifs based storage from other PC's file system on the /docker-mount/files directory.

I expected for docker container's file system to be available to use this network mount, but it's only available with locally created directory files, but not all contents that are mounted inside the files.

I assume this is how linux file system works, but still not confident of that idea.

Is there any way to make this possible?

1 Answers1

0

I suggest that you mount your cifs shared drive as a Docker volume instead. Relying on a shared drive with your host computer is not reliable in my experience, specially with respect to file changes being reflected in the Docker world. Beside, your production environment won't have this shared drive with your development host.

  1. create a docker volume using the Netshare cifs driver. http://netshare.containx.io/docs/cifs#creating-a-volume-with-docker-volume

  2. Then mount your volume normally on any container that requires access to the cifs drive.

Bernard
  • 16,149
  • 12
  • 63
  • 66