gcr

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateManifestList

func CreateManifestList(targetRef string, images []PlatformImage, dockerMediaTypes bool) error

CreateManifestList builds a multi-arch manifest list from the given platform images and pushes it to targetRef. It uses mutate.AppendManifests and remote.WriteIndex (same approach as crane index append), which pushes all child image manifests and layers before pushing the index itself.

When dockerMediaTypes is true, the index is emitted as a Docker manifest list (application/vnd.docker.distribution.manifest.list.v2+json) for Docker Hub compatibility; otherwise an OCI image index is emitted.

func CreateManifestListFromRefs

func CreateManifestListFromRefs(targetRef string, refs []PlatformRef, dockerMediaTypes bool) error

CreateManifestListFromRefs builds a multi-arch manifest list from images that already exist in the registry. It fetches only the descriptors (no layers) and creates a manifest list pointing to them.

When dockerMediaTypes is true, the index is emitted as a Docker manifest list for Docker Hub compatibility; otherwise an OCI image index is emitted.

func Retag

func Retag(sourceRef, targetRef string) error

Retag creates an additional tag alias for an existing image in a registry. It copies the manifest from sourceRef to targetRef without re-uploading layers.

Types

type PlatformImage

type PlatformImage struct {
	Image    v1.Image
	Platform string // e.g. "linux/amd64"
}

PlatformImage pairs a v1.Image (loaded from a local OCI tar) with its target platform string.

type PlatformRef

type PlatformRef struct {
	Ref      string // e.g. "registry.example.com/app:v1.linux-amd64.42"
	Platform string // e.g. "linux/amd64"
}

PlatformRef pairs a registry reference with its target platform.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL