dockerutil

package
v0.0.0-...-b60b6a8 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadParam = errors.New("bad parameter")
	ErrNotFound = errors.New("not found")
)

Functions

func BuildEmptyImage

func BuildEmptyImage(dclient *dockerapi.Client) error

func CleanImageID

func CleanImageID(id string) string

func CopyFromContainer

func CopyFromContainer(dclient *dockerapi.Client, containerID, remote, local string, extract, removeOrig bool) error

func CopyToVolume

func CopyToVolume(dclient *dockerapi.Client, volumeName, source, dstRootDir, dstTargetDir string) error

func CreateVolumeWithData

func CreateVolumeWithData(dclient *dockerapi.Client, source, name string, labels map[string]string) error

func DeleteVolume

func DeleteVolume(dclient *dockerapi.Client, name string) error

func GenStateDirsTar

func GenStateDirsTar(rootDir, stateDir string) (io.Reader, error)

func HasEmptyImage

func HasEmptyImage(dclient *dockerapi.Client) error

func HasVolume

func HasVolume(dclient *dockerapi.Client, name string) error

func ListImages

func ListImages(dclient *dockerapi.Client, imageNameFilter string) (map[string]BasicImageProps, error)

func ListNetworks

func ListNetworks(dclient *dockerapi.Client, nameFilter string) ([]string, error)

func ListVolumes

func ListVolumes(dclient *dockerapi.Client, nameFilter string) ([]string, error)

func PrepareContainerDataArchive

func PrepareContainerDataArchive(fullPath, newName, removePrefix string, removeOrig bool) error

func SaveImage

func SaveImage(dclient *dockerapi.Client, imageRef, local string, extract, removeOrig bool) error

Types

type BasicImageProps

type BasicImageProps struct {
	ID      string
	Size    int64
	Created int64
}

type ImageIdentity

type ImageIdentity struct {
	ID           string
	ShortTags    []string
	RepoTags     []string
	ShortDigests []string
	RepoDigests  []string
}

func APIImagesToIdentity

func APIImagesToIdentity(info *dockerapi.APIImages) *ImageIdentity

func HasImage

func HasImage(dclient *dockerapi.Client, imageRef string) (*ImageIdentity, error)

func ImageToIdentity

func ImageToIdentity(info *dockerapi.Image) *ImageIdentity

Jump to

Keyboard shortcuts

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