registry

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

This section is empty.

Types

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry wraps the internal registry and adds alias retagging.

func NewRegistry

func NewRegistry(dataDir string, registryConfig *model.RegistryConfig) (*Registry, error)

NewRegistry creates a Registry based on the environment (local zot or remote). The dataDir parameter sets persistent storage for the local registry; if empty, a temporary directory is used. The registryConfig is read from hive.yml and provides the registry address for CI pushes.

func (*Registry) Address

func (r *Registry) Address() string

Address returns the registry address (host:port).

func (*Registry) CreateAllManifests

func (r *Registry) CreateAllManifests(project *model.ContainerHiveProject, filters []build.Filter, buildID, distPath string) error

CreateAllManifests creates multi-arch manifest lists for all tags of all images matching the filters. Each manifest combines the platform-specific images whose OCI tars are in distPath. Descriptor info is read from local tars to avoid registry compatibility issues with OCI manifest GET.

func (*Registry) ImageRef

func (r *Registry) ImageRef(imageName, tag, platformStr, buildID string) string

ImageRef returns the full registry reference for a platform-specific image. Format: address/imageName:tag.sanitized-platform[.buildID]

func (*Registry) IsLocal

func (r *Registry) IsLocal() bool

IsLocal returns true if the registry is an embedded local instance.

func (*Registry) Push

func (r *Registry) Push(ctx context.Context, imageName, tag, ociTarPath string) error

Push pushes an OCI tar to the registry.

func (*Registry) RetagAllAliases

func (r *Registry) RetagAllAliases(project *model.ContainerHiveProject, filters []build.Filter, buildID string) error

RetagAllAliases retags aliases for all images in the project. Aliases point to multi-arch manifests (created by CreateAllManifests), not to platform-specific images. If filters is non-empty, only images matching at least one filter are processed. If buildID is set, tags are suffixed with .<buildID> to match pushed tags.

func (*Registry) Start

func (r *Registry) Start(ctx context.Context) error

Start initializes the registry.

func (*Registry) Stop

func (r *Registry) Stop(ctx context.Context) error

Stop shuts down the registry.

func (*Registry) UseDockerMediaTypes added in v0.10.0

func (r *Registry) UseDockerMediaTypes() bool

UseDockerMediaTypes reports whether image manifests and the manifest list should be emitted in Docker-scheme media types rather than OCI. Docker Hub's frontend rejects pure OCI indexes, so pushes to docker.io (or a configured mirror marked as Docker-scheme via hive.yml) need this flag.

Jump to

Keyboard shortcuts

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