Skip to content

Unable to create a docker volume with local CIFS driver #706

@jamiejackson

Description

@jamiejackson
  • CentOS 7.4
  • Docker version 17.10.0-ce, build f4ffd25

I'm trying to create a volume with CIFS and a local driver.

Direct mounting works:

mount -t cifs -o username=user1,password=user1pass,vers=3.0 \
   //localhost/private /tmp/mediashare

Here's my attempt with docker volume create:

 docker volume create \
   --driver local \
   --opt type=cifs \
   --opt device=//localhost/private \
   --opt o=username=user1,password=user1pass,sec=ntlm,vers=3.0 \
   mediashare

docker run -it --rm -v mediashare:/tmp/mediashare \
  -d --name samba-client alpine ash

However, here's the output. The generic invalid argument error seems unhelpful.

docker: Error response from daemon: error while mounting volume '/var/lib/docker/volumes/mediashare/_data': error while mounting volume with options: type='cifs' device='//localhost/private' o='username=user1,password=user1pass,sec=ntlm,vers=3.0': invalid argument.

References

This must be old information, since I don't see a name argument for docker volume create:

I got it working with a plugin (docker-volume-netshare), but I want to try it without.

My Docker Forums post:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions