{"id":"03b9faaf4a33e67a","repo":"docker/cli","slug":"bind-nonrecursive-is-deprecated-use-bind-recursiv","errorCode":null,"errorMessage":"bind-nonrecursive is deprecated, use bind-recursive=disabled instead","messagePattern":"bind-nonrecursive is deprecated, use bind-recursive=disabled instead","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"opts/mount.go","lineNumber":89,"sourceCode":"\t\t\tmount.Source = val\n\t\t\tif !filepath.IsAbs(val) && strings.HasPrefix(val, \".\") {\n\t\t\t\tif abs, err := filepath.Abs(val); err == nil {\n\t\t\t\t\tmount.Source = abs\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"target\", \"dst\", \"destination\":\n\t\t\tmount.Target = val\n\t\tcase \"readonly\", \"ro\":\n\t\t\tmount.ReadOnly, err = parseBoolValue(key, val, hasValue)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\tcase \"consistency\":\n\t\t\tmount.Consistency = mounttypes.Consistency(strings.ToLower(val))\n\t\tcase \"bind-propagation\":\n\t\t\tensureBindOptions(&mount).Propagation = mounttypes.Propagation(strings.ToLower(val))\n\t\tcase \"bind-nonrecursive\":\n\t\t\treturn errors.New(\"bind-nonrecursive is deprecated, use bind-recursive=disabled instead\")\n\t\tcase \"bind-recursive\":\n\t\t\tswitch val {\n\t\t\tcase \"enabled\": // read-only mounts are recursively read-only if Engine >= v25 && kernel >= v5.12, otherwise writable\n\t\t\t\t// NOP\n\t\t\tcase \"disabled\": // previously \"bind-nonrecursive=true\"\n\t\t\t\tensureBindOptions(&mount).NonRecursive = true\n\t\t\tcase \"writable\": // conforms to the default read-only bind-mount of Docker v24; read-only mounts are recursively mounted but not recursively read-only\n\t\t\t\tensureBindOptions(&mount).ReadOnlyNonRecursive = true\n\t\t\tcase \"readonly\": // force recursively read-only, or raise an error\n\t\t\t\tensureBindOptions(&mount).ReadOnlyForceRecursive = true\n\t\t\t\t// TODO: implicitly set propagation and error if the user specifies a propagation in a future refactor/UX polish pass\n\t\t\t\t// https://github.com/docker/cli/pull/4316#discussion_r1341974730\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(`invalid value for %s: %s (must be \"enabled\", \"disabled\", \"writable\", or \"readonly\")`, key, val)\n\t\t\t}\n\t\tcase \"bind-create-src\":\n\t\t\tensureBindOptions(&mount).CreateMountpoint, err = parseBoolValue(key, val, hasValue)\n\t\t\tif err != nil {","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/opts/mount.go#L71-L107","documentation":"Error \"bind-nonrecursive is deprecated, use bind-recursive=disabled instead\" thrown in docker/cli.","triggerScenarios":"Thrown at opts/mount.go:89 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}