From 526defb5715f481e501e6e42307b3c469d48d5d2 Mon Sep 17 00:00:00 2001 From: Kohei Tokunaga Date: Tue, 9 Nov 2021 10:15:27 +0900 Subject: [PATCH] Fix containerd fails to pull OCI image with non-`http(s)://` urls Signed-off-by: Kohei Tokunaga --- remotes/docker/fetcher.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/remotes/docker/fetcher.go b/remotes/docker/fetcher.go index 62098d227..2e2a893a0 100644 --- a/remotes/docker/fetcher.go +++ b/remotes/docker/fetcher.go @@ -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