oci

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0 Imports: 24 Imported by: 2

Documentation

Index

Constants

View Source
const (
	LocalDomain = "apko.local"
	LocalRepo   = "cache"
)

Variables

This section is empty.

Functions

func BuildImageFromLayer added in v0.7.0

func BuildImageFromLayer(ctx context.Context, baseImage v1.Image, layer v1.Layer, oic types.ImageConfiguration, created time.Time, arch types.Architecture) (v1.Image, error)

func BuildImageFromLayers added in v0.25.6

func BuildImageFromLayers(ctx context.Context, baseImage v1.Image, layers []v1.Layer, oic types.ImageConfiguration, created time.Time, arch types.Architecture) (v1.Image, error)

func BuildImageTarballFromLayer

func BuildImageTarballFromLayer(ctx context.Context, imageRef string, layer v1.Layer, outputTarGZ string, ic types.ImageConfiguration, opts options.Options) error

func BuildIndex added in v0.7.0

func BuildIndex(outfile string, idx v1.ImageIndex, tags []string) (name.Digest, error)

BuildIndex builds a self-contained tar.gz file containing the index and its individual images for all architectures. Returns the digest and the path to the combined tar.gz.

func GenerateDockerIndex added in v0.9.0

func GenerateDockerIndex(ctx context.Context, ic types.ImageConfiguration, imgs map[types.Architecture]v1.Image, created time.Time) (name.Digest, v1.ImageIndex, error)

GenerateDockerIndex generates a docker multi-arch manifest from the given imgs. The index type will be "application/vnd.docker.distribution.manifest.list.v2+json". The index is stored in memory.

func GenerateIndex added in v0.9.0

func GenerateIndex(ctx context.Context, ic types.ImageConfiguration, imgs map[types.Architecture]v1.Image, created time.Time) (name.Digest, v1.ImageIndex, error)

GenerateIndex generates an OCI image index from the given imgs. The index type will be "application/vnd.oci.image.index.v1+json". The index is stored in memory.

func LoadImage added in v0.10.0

func LoadImage(ctx context.Context, image v1.Image, tags []string) (name.Reference, error)

func LoadIndex added in v0.10.0

func LoadIndex(ctx context.Context, idx v1.ImageIndex, tags []string) (name.Reference, error)

If attempting to save locally, pick the native architecture and use that cached image for local tags Ported from https://github.com/ko-build/ko/blob/main/pkg/publish/daemon.go#L92-L168

func PublishImagesFromIndex added in v0.9.0

func PublishImagesFromIndex(ctx context.Context, idx v1.ImageIndex, repo name.Repository, remoteOpts ...remote.Option) ([]name.Digest, error)

PublishImagesFromIndex publishes all images from an index to a remote registry. The only difference between this and PublishIndex is that PublishIndex pushes out all blobs and referenced manifests from within the index. This adds pushing the referenced Image artifacts along with appropriate tags.

func PublishIndex added in v0.2.0

func PublishIndex(ctx context.Context, idx v1.ImageIndex, tags []string, remoteOpts ...remote.Option) (name.Digest, error)

PublishIndex given an v1.ImageIndex, publish it to a registry. `local` causes it to publish to the local docker daemon instead of the registry. Note that docker, when provided with a multi-architecture index, will load just the image inside for the provided platform, defaulting to the one on which the docker daemon is running. PublishIndex will determine that platform and use it to publish the updated index.

Types

This section is empty.

Jump to

Keyboard shortcuts

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