warmer

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

This section is empty.

Functions

func ParseDockerfile

func ParseDockerfile(opts *config.WarmerOptions) ([]string, error)

func WarmCache

func WarmCache(opts *config.WarmerOptions) error

WarmCache populates the cache

Types

type FetchLocalSource

type FetchLocalSource func(*config.CacheOptions, string) (v1.Image, error)

FetchLocalSource retrieves a Docker image manifest from a local source. github.com/GoogleContainerTools/kaniko/cache.LocalSource can be used as this type.

type FetchRemoteImage

type FetchRemoteImage func(image string, opts config.RegistryOptions, customPlatform string) (v1.Image, error)

FetchRemoteImage retrieves a Docker image manifest from a remote source. github.com/GoogleContainerTools/kaniko/image/remote.RetrieveRemoteImage can be used as this type.

type OciWarmer

type OciWarmer struct {
	Remote FetchRemoteImage
	Local  FetchLocalSource
	TmpDir string
}

func (*OciWarmer) Resolve added in v1.27.6

func (w *OciWarmer) Resolve(image string, opts *config.WarmerOptions) (name.Reference, v1.Image, v1.Hash, error)

Resolve fetches the image manifest and resolves its digest, short-circuiting with AlreadyCachedErr if the local cache already holds it.

func (*OciWarmer) Warm

func (w *OciWarmer) Warm(image string, opts *config.WarmerOptions) (v1.Hash, error)

Warm retrieves a Docker image and populates the supplied buffer with the image content and manifest or returns an AlreadyCachedErr if the image is present in the cache.

func (*OciWarmer) Write added in v1.27.6

func (w *OciWarmer) Write(cacheRef name.Reference, img v1.Image) error

Write materializes the image as an ocilayout under TmpDir.

type Warmer

type Warmer struct {
	Remote         FetchRemoteImage
	Local          FetchLocalSource
	TarWriter      io.Writer
	ManifestWriter io.Writer
}

Warmer is used to prepopulate the cache with a Docker image

func (*Warmer) Resolve added in v1.27.6

func (w *Warmer) Resolve(image string, opts *config.WarmerOptions) (name.Reference, v1.Image, v1.Hash, error)

Resolve fetches the image manifest and resolves its digest, short-circuiting with AlreadyCachedErr if the local cache already holds it.

func (*Warmer) Warm

func (w *Warmer) Warm(image string, opts *config.WarmerOptions) (v1.Hash, error)

Warm retrieves a Docker image and populates the supplied buffer with the image content and manifest or returns an AlreadyCachedErr if the image is present in the cache.

func (*Warmer) Write added in v1.27.6

func (w *Warmer) Write(cacheRef name.Reference, img v1.Image) error

Write streams the image as a Docker tarball to TarWriter and its raw manifest to ManifestWriter.

Jump to

Keyboard shortcuts

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