Documentation
¶
Overview ¶
Package mod changes an image according to the requested modifications.
Index ¶
- func Apply(ctx context.Context, rc *regclient.RegClient, r ref.Ref, opts ...Opts) (ref.Ref, error)
- type Opts
- func WithAnnotation(name, value string) Opts
- func WithAnnotationOCIBase(rBase ref.Ref, dBase digest.Digest) Opts
- func WithConfigTimestampFromLabel(label string) Opts
- func WithConfigTimestampMax(t time.Time) Opts
- func WithData(maxDataSize int64) Opts
- func WithExposeAdd(port string) Opts
- func WithExposeRm(port string) Opts
- func WithLabel(name, value string) Opts
- func WithLabelToAnnotation() Opts
- func WithLayerRmCreatedBy(re regexp.Regexp) Opts
- func WithLayerRmIndex(index int) Opts
- func WithLayerStripFile(file string) Opts
- func WithLayerTimestampFromLabel(label string) Opts
- func WithLayerTimestampMax(t time.Time) Opts
- func WithManifestToOCI() Opts
- func WithVolumeAdd(volume string) Opts
- func WithVolumeRm(volume string) Opts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Opts ¶
type Opts func(*dagConfig)
Opts defines options for Apply
func WithAnnotation ¶
WithAnnotation adds an annotation, or deletes it if the value is set to an empty string
func WithAnnotationOCIBase ¶
WithAnnotationOCIBase adds annotations for the base image
func WithConfigTimestampFromLabel ¶
WithConfigTimestampFromLabel sets the max timestamp in the config to match a label value
func WithConfigTimestampMax ¶
WithConfigTimestampMax sets the max timestamp on any config objects
func WithData ¶
WithData sets the descriptor data field max size. This also strips the data field off descriptors above the max size.
func WithExposeAdd ¶
WithExposeAdd defines an exposed port in the image config
func WithExposeRm ¶
WithExposeRm deletes an exposed from the image config
func WithLabelToAnnotation ¶
func WithLabelToAnnotation() Opts
WithLabelToAnnotation copies image config labels to manifest annotations
func WithLayerRmCreatedBy ¶
WithLayerRmCreatedBy deletes a layer based on a regex of the created by field in the config history for that layer
func WithLayerRmIndex ¶
WithLayerRmIndex deletes a layer by index. The index starts at 0.
func WithLayerStripFile ¶
WithLayerStripFile removes a file from within the layer tar
func WithLayerTimestampFromLabel ¶
WithLayerTimestampFromLabel sets the max layer timestamp based on a label in the image
func WithLayerTimestampMax ¶
WithLayerTimestampMax ensures no file timestamps are after specified time
func WithManifestToOCI ¶
func WithManifestToOCI() Opts
WithManifestToOCI converts the manifest to OCI media types
func WithVolumeAdd ¶
WithVolumeAdd defines a volume in the image config
func WithVolumeRm ¶
WithVolumeRm deletes a volume from the image config