Documentation
¶
Index ¶
- Variables
- func AssertConsistentMediaType(img v1.Image) error
- func ReplaceBase(img, base v1.Image) (v1.Image, error)
- func RetrieveSourceImage(stage config.KanikoStage, opts *config.KanikoOptions) (v1.Image, error)
- func RetrieveSourceImageInternal(baseName string, baseImageStoredLocally bool, baseImageIndex int, ...) (v1.Image, error)
- func WithMediaType(img v1.Image, manifestMT types.MediaType) (v1.Image, error)
- func WithoutAnnotations(img v1.Image) v1.Image
Constants ¶
This section is empty.
Variables ¶
var ( // RetrieveRemoteImage downloads an image from a remote location RetrieveRemoteImage = remote.RetrieveRemoteImage EmptyBaseImage v1.Image = func() v1.Image { image := empty.Image if config.FF.OCIScratchBase { image = mutate.ConfigMediaType( mutate.MediaType(image, types.OCIManifestSchema1), types.OCIConfigJSON, ) } return image }() )
Functions ¶
func AssertConsistentMediaType ¶ added in v1.28.1
func ReplaceBase ¶ added in v1.27.6
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 WithMediaType ¶ added in v1.28.1
func WithoutAnnotations ¶ added in v1.27.6
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.