docker/cli ยท error
invalid value for '%s': invalid boolean value (%q): must be
Error message
invalid value for '%s': invalid boolean value (%q): must be one of "true", "1", "false", or "0" (default "true")
What it means
Error "invalid value for '%s': invalid boolean value (%q): must be one of "true", "1", "false", or "0" (default "true")" thrown in docker/cli.
Source
Thrown at opts/mount_utils.go:85
return nil
}
// parseBoolValue returns the boolean value represented by the string. It returns
// true if no value is set.
//
// It is similar to [strconv.ParseBool], but only accepts 1, true, 0, false.
// Any other value returns an error.
func parseBoolValue(key string, val string, hasValue bool) (bool, error) {
if !hasValue {
return true, nil
}
switch val {
case "1", "true":
return true, nil
case "0", "false":
return false, nil
default:
return false, fmt.Errorf(`invalid value for '%s': invalid boolean value (%q): must be one of "true", "1", "false", or "0" (default "true")`, key, val)
}
}
func ensureVolumeOptions(m *mount.Mount) *mount.VolumeOptions {
if m.VolumeOptions == nil {
m.VolumeOptions = &mount.VolumeOptions{}
}
return m.VolumeOptions
}
func ensureVolumeDriver(m *mount.Mount) *mount.Driver {
ensureVolumeOptions(m)
if m.VolumeOptions.DriverConfig == nil {
m.VolumeOptions.DriverConfig = &mount.Driver{}
}
return m.VolumeOptions.DriverConfig
}
View on GitHub (pinned to e9452d6e78)
When it happens
Trigger: Thrown at opts/mount_utils.go:85 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of docker/cli@e9452d6e78 (2026-08-01).
Data as JSON: /data/errors/4af858c7caa4c1db.json.
Report an issue: GitHub.