diff --git a/cli/command/container/opts.go b/cli/command/container/opts.go index a68bbe4833..578f4dc099 100644 --- a/cli/command/container/opts.go +++ b/cli/command/container/opts.go @@ -360,13 +360,12 @@ func parse(flags *pflag.FlagSet, copts *containerOptions, serverOS string) (*con toBind := bind if parsed.Type == string(mounttypes.TypeBind) { - if hostPart, targetPath, ok := strings.Cut(bind, ":"); ok { + if hostPart, _, ok := strings.Cut(bind, ":"); ok { if strings.HasPrefix(hostPart, "."+string(filepath.Separator)) || hostPart == "." { if absHostPart, err := filepath.Abs(hostPart); err == nil { hostPart = absHostPart } } - toBind = hostPart + ":" + targetPath } }