ocipull

package
v5.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPolicyJSONPath = ""

DefaultPolicyJSONPath should be overwritten at build time with the real path to the directory where the shipped policy.json file is located. This can either be absolute path or a relative path. If it is relative it will be resolved relative to the podman binary and NOT the CWD.

use "-X github.com/containers/podman/v5/pkg/machine/ocipull.DefaultPolicyJSONPath=/somepath" in go ldflags to overwrite this

Functions

func GetDiskArtifactReference

func GetDiskArtifactReference(ctx context.Context, imgSrc types.ImageSource, opts *DiskArtifactOpts) (digest.Digest, error)

func GetLocalBlob

func GetLocalBlob(ctx context.Context, path string) (*types.BlobInfo, error)

func Pull

func Pull(ctx context.Context, imageInput types.ImageReference, localDestPath *define.VMFile, options *PullOptions) error

Pull `imageInput` from a container registry to `sourcePath`.

func StripOCIReference

func StripOCIReference(input string) string

Types

type DiskArtifactOpts

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

type Disker

type Disker interface {
	Get() error
}

type LocalBlobDir

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

func NewOCIDir

func NewOCIDir(ctx context.Context, inputDir, machineImageDir, vmName string) *LocalBlobDir

func (*LocalBlobDir) Decompress

func (l *LocalBlobDir) Decompress(compressedFile *define.VMFile) (*define.VMFile, error)

func (*LocalBlobDir) DiskEndpoint

func (l *LocalBlobDir) DiskEndpoint() string

func (*LocalBlobDir) LocalBlob

func (l *LocalBlobDir) LocalBlob() *types.BlobInfo

func (*LocalBlobDir) Pull

func (l *LocalBlobDir) Pull() error

func (*LocalBlobDir) Unpack

func (l *LocalBlobDir) Unpack() (*define.VMFile, error)

type OCIArtifactDisk

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

func NewOCIArtifactPull

func NewOCIArtifactPull(ctx context.Context, dirs *define.MachineDirs, endpoint string, vmName string, vmType define.VMType, finalPath *define.VMFile) (*OCIArtifactDisk, error)

func (*OCIArtifactDisk) Get

func (o *OCIArtifactDisk) Get() error

func (*OCIArtifactDisk) GetNoCompress

func (o *OCIArtifactDisk) GetNoCompress() error

func (*OCIArtifactDisk) OriginalFileName

func (o *OCIArtifactDisk) OriginalFileName() (string, string)

type OCIKind

type OCIKind string
var (
	OCIDir      OCIKind = "oci-dir"
	OCIRegistry OCIKind = "docker"
	OCIUnknown  OCIKind = "unknown"
)

func (OCIKind) IsOCIDir

func (o OCIKind) IsOCIDir() bool

func (OCIKind) String

func (o OCIKind) String() string

type OCIOpts

type OCIOpts struct {
	Scheme *OCIKind
	Dir    *string
}

type OSVersion

type OSVersion struct {
	*semver.Version
}

type PullOptions

type PullOptions struct {
	// Require HTTPS and verify certificates when accessing the registry.
	TLSVerify bool
	// [username[:password] to use when connecting to the registry.
	Credentials string
	// Quiet the progress bars when pushing.
	Quiet bool
}

PullOptions includes data to alter certain knobs when pulling a source image.

Jump to

Keyboard shortcuts

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