From 59b90305f7c2ac721392db79e59867c896247ee0 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 28 Oct 2024 23:13:31 +0100 Subject: [PATCH] cli/command/container: parse: remove client-side warning remove a client-side warning about volume drivers combined with "mounts" in favor of producing the warning on the daemon side. Signed-off-by: Sebastiaan van Stijn --- cli/command/container/opts.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cli/command/container/opts.go b/cli/command/container/opts.go index 210688489813..381319b19ccd 100644 --- a/cli/command/container/opts.go +++ b/cli/command/container/opts.go @@ -23,7 +23,6 @@ import ( "github.com/docker/docker/errdefs" "github.com/docker/go-connections/nat" "github.com/pkg/errors" - "github.com/sirupsen/logrus" "github.com/spf13/pflag" cdi "tags.cncf.io/container-device-interface/pkg/parser" ) @@ -364,10 +363,6 @@ func parse(flags *pflag.FlagSet, copts *containerOptions, serverOS string) (*con return nil, errors.Errorf("invalid value: %d. Valid memory swappiness range is 0-100", swappiness) } - mounts := copts.mounts.Value() - if len(mounts) > 0 && copts.volumeDriver != "" { - logrus.Warn("`--volume-driver` is ignored for volumes specified via `--mount`. Use `--mount type=volume,volume-driver=...` instead.") - } var binds []string volumes := copts.volumes.GetMap() // add any bind targets to the list of container volumes @@ -697,7 +692,7 @@ func parse(flags *pflag.FlagSet, copts *containerOptions, serverOS string) (*con Tmpfs: tmpfs, Sysctls: copts.sysctls.GetAll(), Runtime: copts.runtime, - Mounts: mounts, + Mounts: copts.mounts.Value(), MaskedPaths: maskedPaths, ReadonlyPaths: readonlyPaths, Annotations: copts.annotations.GetAll(),