MCPcopy Create free account
hub / github.com/docker/cli / getManifest

Function getManifest

cli/command/manifest/util.go:72–84  ·  view source on GitHub ↗

getManifest from the local store, and fallback to the remote registry if it doesn't exist locally

(ctx context.Context, dockerCLI command.Cli, listRef, namedRef reference.Named, insecure bool)

Source from the content-addressed store, hash-verified

70// getManifest from the local store, and fallback to the remote registry if it
71// doesn't exist locally
72func getManifest(ctx context.Context, dockerCLI command.Cli, listRef, namedRef reference.Named, insecure bool) (types.ImageManifest, error) {
73 data, err := newManifestStore(dockerCLI).Get(listRef, namedRef)
74 switch {
75 case errdefs.IsNotFound(err):
76 return newRegistryClient(dockerCLI, insecure).GetManifest(ctx, namedRef)
77 case err != nil:
78 return types.ImageManifest{}, err
79 case len(data.Raw) == 0:
80 return newRegistryClient(dockerCLI, insecure).GetManifest(ctx, namedRef)
81 default:
82 return data, nil
83 }
84}

Callers 1

createManifestListFunction · 0.70

Calls 4

newManifestStoreFunction · 0.85
newRegistryClientFunction · 0.85
GetMethod · 0.65
GetManifestMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…