Merge pull request #6221 from ktock/urls-fallback

Fix containerd fails to pull OCI image with non-`http(s)://` urls
This commit is contained in:
Derek McGowan 2021-11-11 21:44:04 -08:00 committed by GitHub
commit aa1b073616
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,6 +59,10 @@ func (r dockerFetcher) Fetch(ctx context.Context, desc ocispec.Descriptor) (io.R
log.G(ctx).WithError(err).Debug("failed to parse")
continue
}
if u.Scheme != "http" && u.Scheme != "https" {
log.G(ctx).Debug("non-http(s) alternative url is unsupported")
continue
}
log.G(ctx).Debug("trying alternative url")
// Try this first, parse it