Hi - I have a Docker image that runs an NFS server for other containers. This worked fine on docker-machine (VirtualBox) but does not work under the docker mac beta. If I try a simple nfs server image, …
docker run -it --name mynfs --privileged erezhorev/dockerized_nfs_server /home
- Not starting NFS kernel daemon: no support in current kernel.
My container gives a message that similarly indicates that the kernel is missing NFS support.
Is there a workaround that I can try (e.g. somehow install NFS support in the Xhyve machine)? If not, then do you plan to add NFS support at some point? Thanks! – Adam
Just confirming that this was answered by @justincormack via email. The current VM doesn’t have the NFS kernel module loaded. We may add this either the client/server kernel modules in a future release if it’s necessary.
Out of interest, why are you using NFS between containers. It’s possible, and maybe faster, to share data using
--volumes-from and/or named volumes - see [here] (https://docs.docker.com/engine/userguide/containers/dockervolumes/).
Nfs client and server support (v3 and v4) will be in next week’s beta.
Generally you can install kernel modules from a sufficiently privileged container, but building them is a bit fiddly and I havent made an easy container to do it yet.
Hi - Yes - Justin has answered and Ben asked me to post this question to the forum.
Your question of why I need NFS is a good one. The reason is that I’m using a system called “CVMFS” (CERN Virtual Filesystem - see https://cernvm.cern.ch/portal/filesystem). It is a publish/subscribe system that Experimental Particle Physics experiments use to distribute their code libraries and executables. It is a FUSE system that talks to servers and presents to the subscriber the entire code base as a filesystem, but only downloads and caches what you actually access. It’s quite neat.
Because it isn’t a real filesystem, sharing /cvmfs/whatever with --volumes-from to a different container doesn’t work (accessing a “file” from a different container doesn’t trigger a download because the process that manages CVMFS on the main container doesn’t notice the other’s access). This is a known issue with CVMFS that is difficult to fix. CVMFS does deal with NFS correctly. So you can mount a CVMFS filesystem via NFS and the main container will handle accesses from other containers (or even the host) correctly. It’s a nice, but complicated system.
Hope this helps. – Adam
@justincormack: Excellent! Looking forward to next week’s beta. Thanks! – Adam
Docker Mac Beta 1.11.1-beta11 fixes this problem! Thanks!! – Adam