extract

package
v3.11.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2018 License: Apache-2.0 Imports: 28 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(name string, streams genericclioptions.IOStreams) *cobra.Command

New creates a new command

Types

type LayerFilter

type LayerFilter interface {
	Filter(layers []distribution.Descriptor) ([]distribution.Descriptor, error)
}

func NewPositionLayerFilter

func NewPositionLayerFilter(at int32) LayerFilter

type Mapping

type Mapping struct {
	// Name is provided for caller convenience for associating image callback metadata with a mapping
	Name string
	// Image is the raw input image to extract
	Image string
	// ImageRef is the parsed version of the raw input image
	ImageRef imagereference.DockerImageReference
	// LayerFilter can select which images to load
	LayerFilter LayerFilter
	// From is the directory or file in the image to extract
	From string
	// To is the directory to extract the contents of the directory or the named file into.
	To string
	// ConditionFn is invoked before extracting the content and allows the set of images to be filtered.
	ConditionFn func(m *Mapping, dgst digest.Digest, imageConfig *docker10.DockerImageConfig) (bool, error)
}

type Options

type Options struct {
	Mappings []Mapping

	Paths []string

	OnlyFiles         bool
	RemovePermissions bool

	FilterOptions imagemanifest.FilterOptions

	MaxPerRegistry int

	DryRun   bool
	Insecure bool

	genericclioptions.IOStreams

	ImageMetadataCallback func(m *Mapping, dgst digest.Digest, imageConfig *docker10.DockerImageConfig)
}

func NewOptions

func NewOptions(streams genericclioptions.IOStreams) *Options

func (*Options) Complete

func (o *Options) Complete(cmd *cobra.Command, args []string) error

func (*Options) Run

func (o *Options) Run() error

Jump to

Keyboard shortcuts

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