From 0ba9e96df7adb25001b8194c3aae2874d670b995 Mon Sep 17 00:00:00 2001 From: 24sama Date: Fri, 10 Feb 2023 22:08:00 +0800 Subject: [PATCH] inspect function support resolving shortname Signed-off-by: 24sama --- pkg/buildah/inspect.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkg/buildah/inspect.go b/pkg/buildah/inspect.go index 9ad524bad47c..91d33f97439d 100644 --- a/pkg/buildah/inspect.go +++ b/pkg/buildah/inspect.go @@ -26,7 +26,6 @@ import ( "text/template" "github.com/containers/common/pkg/retry" - "github.com/containers/image/v5/docker/reference" "github.com/containers/image/v5/manifest" "github.com/containers/image/v5/pkg/shortnames" "github.com/opencontainers/go-digest" @@ -259,10 +258,6 @@ func inspectImage(ctx context.Context, sc *types.SystemContext, store storage.St if err != nil { return nil, nil, fmt.Errorf("error resolve shortname %s: %w", imgName, storage.ErrImageUnknown) } - // also try out the "docker.io/" prefixed image - if dockerNamed, err := reference.ParseDockerRef(imgName); err == nil { - candidates = append(candidates, dockerNamed) - } var errs []error for _, candidate := range candidates {