diff --git a/docs/reference/commandline/service_create.md b/docs/reference/commandline/service_create.md index 442df249e3..75d08e551b 100644 --- a/docs/reference/commandline/service_create.md +++ b/docs/reference/commandline/service_create.md @@ -442,13 +442,13 @@ The following options can only be used for bind mounts (`type=bind`): A value is one of:

diff --git a/opts/mount.go b/opts/mount.go index e2c7e039f7..3ab9b36d64 100644 --- a/opts/mount.go +++ b/opts/mount.go @@ -116,16 +116,7 @@ func (m *MountOpt) Set(value string) error { } logrus.Warn("bind-nonrecursive is deprecated, use bind-recursive=disabled instead") case "bind-recursive": - valS := val - // Allow boolean as an alias to "enabled" or "disabled" - if b, err := strconv.ParseBool(valS); err == nil { - if b { - valS = "enabled" - } else { - valS = "disabled" - } - } - switch valS { + switch val { case "enabled": // read-only mounts are recursively read-only if Engine >= v25 && kernel >= v5.12, otherwise writable // NOP case "disabled": // alias of bind-nonrecursive=true