docker/cli ยท error
"default" is a reserved context name
Error message
"default" is a reserved context name
What it means
Error ""default" is a reserved context name" thrown in docker/cli.
Source
Thrown at cli/context/store/store.go:221
return s.tls.getData(contextName, endpointName, fileName)
}
// GetStorageInfo returns the paths where the Metadata and TLS data are stored
// for the context.
func (s *ContextStore) GetStorageInfo(contextName string) StorageInfo {
return StorageInfo{
MetadataPath: s.meta.contextDir(contextdirOf(contextName)),
TLSPath: s.tls.contextDir(contextName),
}
}
// ValidateContextName checks a context name is valid.
func ValidateContextName(name string) error {
if name == "" {
return errors.New("context name cannot be empty")
}
if name == "default" {
return errors.New(`"default" is a reserved context name`)
}
if !isValidName(name) {
return fmt.Errorf("context name %q is invalid, names are validated against regexp %q", name, validNameFormat)
}
return nil
}
// validNameFormat is used as part of errors for invalid context-names.
// We should consider making this less technical ("must start with "a-z",
// and only consist of alphanumeric characters and separators").
const validNameFormat = `^[a-zA-Z0-9][a-zA-Z0-9_.+-]+$`
// isValidName checks if the context-name is valid ("^[a-zA-Z0-9][a-zA-Z0-9_.+-]+$").
//
// Names must start with an alphanumeric character (a-zA-Z0-9), followed by
// alphanumeric or separators ("_", ".", "+", "-").
func isValidName(s string) bool {
if len(s) < 2 || !isAlphaNum(s[0]) {View on GitHub (pinned to e9452d6e78)
When it happens
Trigger: Thrown at cli/context/store/store.go:221 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/10f11c57f94102cc.json.
Report an issue: GitHub.