image

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// RetrieveRemoteImage downloads an image from a remote location
	RetrieveRemoteImage = remote.RetrieveRemoteImage

	EmptyBaseImage v1.Image = func() v1.Image {
		image := empty.Image
		if config.EnvBool("FF_KANIKO_OCI_SCRATCH_BASE") {
			image = mutate.ConfigMediaType(
				mutate.MediaType(image, types.OCIManifestSchema1),
				types.OCIConfigJSON,
			)
		}
		return image
	}()
)

Functions

func ReplaceBase added in v1.27.6

func ReplaceBase(img, base v1.Image) (v1.Image, error)

ReplaceBase returns img with its first len(base.Layers()) layers and first len(base.ConfigFile().History) history entries replaced by base's. img's full top-level ConfigFile (Architecture/OS, Created, Container, the inner Config.Cmd/Env/Entrypoint/Labels/…) is carried through unchanged.

Unlike mutate.Rebase, this has no digest-prefix verifier and no os/arch swap — it's a pure layer/history splice that trusts the caller's invariant that img.Layers()[:len(base.Layers())] are the recipient of base.

func RetrieveSourceImage

func RetrieveSourceImage(stage config.KanikoStage, opts *config.KanikoOptions) (v1.Image, error)

RetrieveSourceImage returns the base image of the stage at index

func RetrieveSourceImageInternal added in v1.26.5

func RetrieveSourceImageInternal(baseName string, baseImageStoredLocally bool, baseImageIndex int, metaArgs []instructions.ArgCommand, opts *config.KanikoOptions) (v1.Image, error)

func WithoutAnnotations added in v1.27.6

func WithoutAnnotations(img v1.Image) v1.Image

WithoutAnnotations returns an image whose manifest has no annotations. mutate.Annotations only merges into existing annotations and cannot delete keys, so we wrap the image to intercept Manifest and RawManifest instead.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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