docker

package
v0.0.0-...-c1241cb Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMultipleManifests = fmt.Errorf("cannot process multiple docker manifests")

Functions

This section is empty.

Types

type DaemonImageProvider

type DaemonImageProvider struct {
	// contains filtered or unexported fields
}

DaemonImageProvider is a image.Provider capable of fetching and representing a docker image from the docker daemon API.

func NewProviderFromDaemon

func NewProviderFromDaemon(imgStr string, tmpDirGen *file.TempDirGenerator, c client.APIClient, platform *image.Platform) (*DaemonImageProvider, error)

NewProviderFromDaemon creates a new provider instance for a specific image that will later be cached to the given directory.

func (*DaemonImageProvider) Provide

func (p *DaemonImageProvider) Provide(ctx context.Context, userMetadata ...image.AdditionalMetadata) (*image.Image, error)

Provide an image object that represents the cached docker image tar fetched from a docker daemon.

type LayerID

type LayerID string

type LayerState

type LayerState struct {
	Phase            PullPhase
	PhaseProgress    progress.Progressable
	DownloadProgress progress.Progressable
}

type PullPhase

type PullPhase int
const (
	UnknownPhase PullPhase = iota
	WaitingPhase
	PullingFsPhase
	DownloadingPhase
	DownloadCompletePhase
	ExtractingPhase
	VerifyingChecksumPhase
	AlreadyExistsPhase
	PullCompletePhase
)

type PullStatus

type PullStatus struct {
	// contains filtered or unexported fields
}

func (*PullStatus) Complete

func (p *PullStatus) Complete() bool

func (*PullStatus) Current

func (p *PullStatus) Current(layer LayerID) LayerState

func (*PullStatus) Layers

func (p *PullStatus) Layers() []LayerID

type TarballImageProvider

type TarballImageProvider struct {
	// contains filtered or unexported fields
}

TarballImageProvider is a image.Provider for a docker image (V2) for an existing tar on disk (the output from a "docker image save ..." command).

func NewProviderFromTarball

func NewProviderFromTarball(path string, tmpDirGen *file.TempDirGenerator) *TarballImageProvider

NewProviderFromTarball creates a new provider instance for the specific image already at the given path.

func (*TarballImageProvider) Provide

func (p *TarballImageProvider) Provide(_ context.Context, userMetadata ...image.AdditionalMetadata) (*image.Image, error)

Provide an image object that represents the docker image tar at the configured location on disk.

Jump to

Keyboard shortcuts

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