docker/cli ยท error
unknown server OS: %s
Error message
unknown server OS: %s
What it means
Error "unknown server OS: %s" thrown in docker/cli.
Source
Thrown at cli/command/container/opts.go:1003
k, v, ok := strings.Cut(option, "=")
if !ok {
return nil, errors.New("invalid storage option")
}
m[k] = v
}
return m, nil
}
// parseDevice parses a device mapping string to a container.DeviceMapping struct
func parseDevice(device, serverOS string) (container.DeviceMapping, error) {
switch serverOS {
case "linux":
return parseLinuxDevice(device)
case "windows":
// Windows doesn't support mapping, so passing the given value as-is.
return container.DeviceMapping{PathOnHost: device}, nil
default:
return container.DeviceMapping{}, fmt.Errorf("unknown server OS: %s", serverOS)
}
}
// parseLinuxDevice parses a device mapping string to a container.DeviceMapping struct
// knowing that the target is a Linux daemon
func parseLinuxDevice(device string) (container.DeviceMapping, error) {
var src, dst string
permissions := "rwm"
// We expect 3 parts at maximum; limit to 4 parts to detect invalid options.
arr := strings.SplitN(device, ":", 4)
switch len(arr) {
case 3:
permissions = arr[2]
fallthrough
case 2:
if validDeviceMode(arr[1]) {
permissions = arr[1]
} else {View on GitHub (pinned to e9452d6e78)
When it happens
Trigger: Thrown at cli/command/container/opts.go:1003 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/0332a1d6acf7a3c8.json.
Report an issue: GitHub.