MCPcopy Create free account
hub / github.com/linuxkit/linuxkit / pushWithManifest

Method pushWithManifest

src/cmd/linuxkit/pkglib/dockerimpl.go:482–503  ·  view source on GitHub ↗

nolint:unused // will be used when linuxkit cache is eliminated and we return to docker image cache

(img, suffix string, pushImage, pushManifest bool)

Source from the content-addressed store, hash-verified

480
481//nolint:unused // will be used when linuxkit cache is eliminated and we return to docker image cache
482func (dr *dockerRunnerImpl) pushWithManifest(img, suffix string, pushImage, pushManifest bool) error {
483 var err error
484 if pushImage {
485 fmt.Printf("Pushing %s\n", img+suffix)
486 if err := dr.push(img + suffix); err != nil {
487 return err
488 }
489 } else {
490 fmt.Print("Image push disabled, skipping...\n")
491 }
492
493 if pushManifest {
494 fmt.Printf("Pushing %s to manifest %s\n", img+suffix, img)
495 _, _, err = registry.PushManifest(img, remote.WithAuthFromKeychain(authn.DefaultKeychain))
496 if err != nil {
497 return err
498 }
499 } else {
500 fmt.Print("Manifest push disabled, skipping...\n")
501 }
502 return nil
503}
504
505func (dr *dockerRunnerImpl) Tag(ref, tag string) error {
506 fmt.Printf("Tagging %s as %s\n", ref, tag)

Callers

nothing calls this directly

Calls 1

pushMethod · 0.95

Tested by

no test coverage detected