Docker Community Forums

Share and learn in the Docker community.

Desktop Docker Community Edition - CIFS/NFS support

I know this has been asked 100’s of times and I have tired every solution I can find, but I am not able to get a network share mounted as a volume on the Community Edition of Docker either via CIFS or NFS. I am able to mount the share form the Windows host vie CIFS or NFS.

I am running Community Edition Docker Desktop version 19.03.2, build 6a30dfc.

I think my next step is to install Enterprise Edition and confirm it works there. I am guessing this is a limitation of the Community Edition.

Can anyone confirm if CIFS/NFS is supported on Enterprise Edition only or should it also work on Community Edition?

I would be surprised if the Enterprise Edition would be any different in this regards.

Though, can you share what exactly you did (commands or docker-compose.yml) to use CIFS/NFS as a target for a docker volume? Please paste the unmodified commands or docker-compose.yml as “Preformatted text”, please mask personal details like usernames, passwords, api-tokens, email address, domain names… and keep everything else untouched.

I was finally able to get this to work after numerous trial and error with the syntax using the below to create the volume. I was able to connect to the container than and create and delete files from bash.

docker volume create --driver local --opt type=cifs --opt device=’//nasdevice/share/ --opt o=‘username=user1,password=user1pass’ nasshare

Thats where I was heading at :slight_smile: Sometimes a typo or mixed up syntax can become a huge impediment.

Word of warning: if you ever intend to use the local driver to mount a remote nfs share in a volume declaration in a docker-compose.yml (docker-compose or swarm stack), the volumes will be created the first time the container is scheduled to run on a node. Changes of the (volume) declaration will not update the docker volume, unless you remove it first.