Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 2e9b66f

Browse files
committed
drop volume create driver options
We do not allow users to set any volume driver options. Signed-off-by: Peng Tao <bergwolf@gmail.com>
1 parent 474cb1f commit 2e9b66f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

api/client/volume.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,12 @@ func (cli *DockerCli) CmdVolumeCreate(args ...string) error {
137137
flSnapshot := cmd.String([]string{"-snapshot"}, "", "Specify snapshot to create volume")
138138
flSize := cmd.Int([]string{"-size"}, 10, "Specify volume size")
139139

140-
flDriverOpts := opts.NewMapOpts(nil, nil)
141-
cmd.Var(flDriverOpts, []string{"o", "-opt"}, "Set driver specific options")
142-
143140
cmd.Require(flag.Exact, 0)
144141
cmd.ParseFlags(args, true)
145142

146143
volReq := types.VolumeCreateRequest{
147144
Driver: *flDriver,
148-
DriverOpts: flDriverOpts.GetAll(),
145+
DriverOpts: make(map[string]string),
149146
Name: *flName,
150147
}
151148

0 commit comments

Comments
 (0)