Docker Community Forums

Share and learn in the Docker community.

Docker volume create with options not working in Server 1.4.1/ client 1.12.6

Hi All,

I can not give options while creating docker volumes with
eg: ```
docker volume create --driver local
–opt type=nfs
–opt o=addr=192.168.1.1,rw
–opt device=:/path/to/dir
foo

my server and client versions are

Client:
Version : 1.12.6
API version : 1.25
Go version: go1.7.4

Server:
Version: 1.4.1
API version: 1.25
Go version: go1.8.7

Does this version supports giving options while creating volumes? If not , is there any other alternative ?

The API version 1.25 matches the rather old docker version 1.3.0. Though the version 1.4.1 seems odd. My guess: this is a vendor package from the linux distribution itself?!

‘docker volume create’ does support whatever the mount command of your OS allows. Actualy the local driver is quite primitiv, which suits well for standalone or docker-compose deployment, but has caveats with docker swarm.

I’m using redhat linux RHEL:7.4 image and I’m trying to create the volume separately. The error I’m getting is ‘–opt device is not a supported option’. How to define the mount path in this environment.