docker/cli · error · invalidParameterErr
insecure registry %s is not valid: %w
Error message
insecure registry %s is not valid: %w
What it means
Error "insecure registry %s is not valid: %w" thrown in docker/cli.
Source
Thrown at internal/registry/config.go:137
default:
// unsupported scheme
return nil, invalidParam(fmt.Errorf("insecure registry %s should not contain '://'", r))
}
}
// Check if CIDR was passed to --insecure-registry
_, ipnet, err := net.ParseCIDR(r)
if err == nil {
// Valid CIDR. If ipnet is already in config.InsecureRegistryCIDRs, skip.
for _, value := range insecureRegistryCIDRs {
if value.IP.String() == ipnet.IP.String() && value.Mask.String() == ipnet.Mask.String() {
continue skip
}
}
// ipnet is not found, add it in config.InsecureRegistryCIDRs
insecureRegistryCIDRs = append(insecureRegistryCIDRs, ipnet)
} else {
if err := validateHostPort(r); err != nil {
return nil, invalidParam(fmt.Errorf("insecure registry %s is not valid: %w", r, err))
}
// Assume `host:port` if not CIDR.
indexConfigs[r] = ®istry.IndexInfo{
Name: r,
Secure: false,
Official: false,
}
}
}
// Configure public registry.
indexConfigs[IndexName] = ®istry.IndexInfo{
Name: IndexName,
Secure: true,
Official: true,
}
return &serviceConfig{View on GitHub (pinned to e9452d6e78)
When it happens
Trigger: Thrown at internal/registry/config.go:137 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/cbb04da5501b1e08.json.
Report an issue: GitHub.