From 81a95fade593d4fda6c6f340865ae24824ac2ac8 Mon Sep 17 00:00:00 2001 From: Aditya R Date: Wed, 6 Apr 2022 15:59:59 +0530 Subject: run, mount: allow setting driver specific option using volume-opt `--mount` should allow setting driver specific options using `volume-opt` when `type=volume` is set. This ensures parity with docker's `volume-opt`. Signed-off-by: Aditya R --- pkg/specgenutil/volumes.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg/specgenutil/volumes.go') diff --git a/pkg/specgenutil/volumes.go b/pkg/specgenutil/volumes.go index 8a861077a..aa07de0af 100644 --- a/pkg/specgenutil/volumes.go +++ b/pkg/specgenutil/volumes.go @@ -523,6 +523,8 @@ func getNamedVolume(args []string) (*specgen.NamedVolume, error) { for _, val := range args { kv := strings.SplitN(val, "=", 2) switch kv[0] { + case "volume-opt": + newVolume.Options = append(newVolume.Options, val) case "ro", "rw": if setRORW { return nil, errors.Wrapf(optionArgError, "cannot pass 'ro' and 'rw' options more than once") -- cgit v1.2.3-54-g00ecf