containers

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: Apache-2.0 Imports: 22 Imported by: 3

Documentation

Index

Constants

View Source
const MagicImageScratch = "scratch"

Variables

This section is empty.

Functions

func GetImage added in v0.5.0

func GetImage(ctx context.Context, ref string) (v1.Image, error)

GetImage is functionally the same as Get but returns a v1.Image

func NewLayer

func NewLayer(ctx context.Context, fs fullfs.FullFS, username string, uid int, platform *v1.Platform) (v1.Layer, error)

func NormaliseImage

func NormaliseImage(ctx context.Context, base v1.Image) (v1.Image, error)

NormaliseImage mutates the provided v1.Image to be OCI compliant v1.Image.

Check image-spec to see which properties are ported and which are dropped. https://github.com/opencontainers/image-spec/blob/main/config.md

func Push

func Push(ctx context.Context, img Result, dst string) error

Push uploads a v1.Image or v1.ImageIndex to a remote registry

func Save

func Save(ctx context.Context, img v1.Image, dst, path string) error

Types

type Result added in v0.5.0

type Result interface {
	MediaType() (types.MediaType, error)
	Size() (int64, error)
	Digest() (v1.Hash, error)
	RawManifest() ([]byte, error)
}

func Get

func Get(ctx context.Context, ref string) (Result, error)

Get returns a v1.Image or a v1.ImageIndex depending on what the reference points at.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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