You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
log.G(context.TODO()).Warnf("insecure registry %s should not contain 'https://' and 'https://' has been removed from the insecure registry config", r)
176
-
r=r[8:]
177
-
} elseifhasScheme(r) {
178
-
returninvalidParamf("insecure registry %s should not contain '://'", r)
171
+
ifscheme, host, ok:=strings.Cut(r, "://"); ok {
172
+
switchstrings.ToLower(scheme) {
173
+
case"http", "https":
174
+
log.G(context.TODO()).Warnf("insecure registry %[1]s should not contain '%[2]s' and '%[2]ss' has been removed from the insecure registry config", r, scheme)
175
+
r=host
176
+
default:
177
+
// unsupported scheme
178
+
returninvalidParamf("insecure registry %s should not contain '://'", r)
179
+
}
179
180
}
180
181
// Check if CIDR was passed to --insecure-registry
// If registry is secure and HTTPS failed, show user the error and tell them about `--insecure-registry`
60
61
// in case that's what they need. DO NOT accept unknown CA certificates, and DO NOT fall back to HTTP.
61
-
returnnil, invalidParamf("invalid registry endpoint %s: %v. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry %s` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/%s/ca.crt", endpoint, err, endpoint.URL.Host, endpoint.URL.Host)
62
+
hint:=fmt.Sprintf(
63
+
". If this private registry supports only HTTP or HTTPS with an unknown CA certificate, add `--insecure-registry %[1]s` to the daemon's arguments. "+
64
+
"In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; place the CA certificate at /etc/docker/certs.d/%[1]s/ca.crt",
0 commit comments