ocistore

package
v0.0.9 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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OCIImage

type OCIImage struct {
	Image       v1.Image
	Annotations map[string]string
	Cleanup     func()
}

OCIImage holds a v1.Image extracted from an OCI tar along with its annotations and a cleanup function. The caller must invoke Cleanup when the image is no longer needed (v1.Image reads blobs lazily from disk).

func ImageFromTar

func ImageFromTar(ociTarPath string) (*OCIImage, error)

ImageFromTar extracts an OCI tar to a temporary directory, parses the OCI layout, and returns the first image from the index along with its annotations.

type OCILayoutStore

type OCILayoutStore struct {
	Store  content.Store
	Digest digest.Digest
	// contains filtered or unexported fields
}

OCILayoutStore wraps a containerd content.Store backed by an extracted OCI tar layout. The Digest field holds the manifest digest from index.json, used to wire up BuildKit named contexts via oci-layout:<storeID>@<digest>.

func FromTar

func FromTar(ociTarPath, destDir string) (*OCILayoutStore, error)

FromTar extracts an OCI image tar to destDir and returns an OCILayoutStore backed by the extracted blobs directory. The store can be passed directly to BuildKit's SolveOpt.OCIStores for named context resolution.

Jump to

Keyboard shortcuts

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