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

Function validateTag

cmd/docker-trust/trust/sign.go:135–144  ·  view source on GitHub ↗
(imgRefAndAuth trust.ImageRefAndAuth)

Source from the content-addressed store, hash-verified

133}
134
135func validateTag(imgRefAndAuth trust.ImageRefAndAuth) error {
136 tag := imgRefAndAuth.Tag()
137 if tag == "" {
138 if imgRefAndAuth.Digest() != "" {
139 return errors.New("cannot use a digest reference for IMAGE:TAG")
140 }
141 return fmt.Errorf("no tag specified for %s", imgRefAndAuth.Name())
142 }
143 return nil
144}
145
146func checkLocalImageExistence(ctx context.Context, apiClient client.APIClient, imageName string) error {
147 _, err := apiClient.ImageInspect(ctx, imageName)

Callers 1

runSignImageFunction · 0.70

Calls 3

TagMethod · 0.45
DigestMethod · 0.45
NameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…