4

Docker newbie here trying to get a build environment working in a container with a NFS mount and not sure if this is doable?

Would this be the right thing to run so that the container would have continual access to the NFS mount within the container?

docker run -itv "NFS mount:container mount location" "container id"

Thanks in advance.

  • have you seen http://stackoverflow.com/questions/20581678/using-docker-volume-with-a-nfs-partition ? – Andy Jan 20 '15 at 02:28
  • Hi Andy I actually had. I guess my question was more really the correct syntax as well. Is it really as was suggested in the other link: docker run -i -v -t /server name/nfs version/mount path:/container path ? Is there an article that has this clearly defined? Thanks. – newbie_starter Jan 20 '15 at 12:07
  • I left out that I tried it and it didn't produce the expected mount. It does appear that it tried to mount as before in my container mount location there was an empty directory which is now gone but nothing else was mounted like expected. Any suggestions on debugging as I can mount this fine on a normal machine? Thanks for all the help. – newbie_starter Jan 20 '15 at 14:45

1 Answers1

1

I see the same problem with docker 1.3.2. The nfs mounted volume only shows one subdirectory and creating files in there does not show on the nfs share. Instead, it shows up on the local file system. This can be seen after unmounting nfs share.

However, things work just fine with docker 1.1.2 or 1.4.1, and probably a number of others.

In short: upgrade docker to 1.4.1

waldemar
  • 11
  • 1