agent/dockerclient/dockerauth/dockerauth.go
func stripRegistrySchema(registry string) string {
	if strings.HasPrefix(registry, "http://") {
		return strings.TrimPrefix(registry, "http://")
	} else if strings.HasPrefix(registry, "https://") {
		return strings.TrimPrefix(registry, "https://")
	}
	return registry
}
func stripRegistrySchema(registry string) string {
	if strings.HasPrefix(registry, "http://") {
		return strings.TrimPrefix(registry, "http://")
	} else if strings.HasPrefix(registry, "https://") {
		return strings.TrimPrefix(registry, "https://")
	}
	return registry
}
// stripRegistrySchema normalizes the registry url by removing http/https from it.
// because registries only support those two schemas, this function can be quite naive.