Skip to content

Commit 01428ec

Browse files
committed
Fix containerd fails to pull OCI image with non-http(s):// urls
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com> (cherry picked from commit 526defb) Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
1 parent 3575b76 commit 01428ec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

remotes/docker/fetcher.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ func (r dockerFetcher) Fetch(ctx context.Context, desc ocispec.Descriptor) (io.R
6060
log.G(ctx).WithError(err).Debug("failed to parse")
6161
continue
6262
}
63+
if u.Scheme != "http" && u.Scheme != "https" {
64+
log.G(ctx).Debug("non-http(s) alternative url is unsupported")
65+
continue
66+
}
6367
log.G(ctx).Debug("trying alternative url")
6468

6569
// Try this first, parse it

0 commit comments

Comments
 (0)