docker

package
v1.3.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTempDir added in v1.3.1

func CreateTempDir() *string

func ExtractImage

func ExtractImage(target *string) (*[]model.Location, *string)

ExtractImage extracts a Docker image to a temporary directory and returns the path to the directory.

func ExtractTarFile added in v1.3.1

func ExtractTarFile(tar *string) (*[]model.Location, *string)

func FindImageFromLocal

func FindImageFromLocal(target *string) *string

FindImageFromLocal searches for a Docker image of the given target on the local system. If found, it returns its ID; otherwise it returns nil.

func GetImageID

func GetImageID(target *string, credential *types.AuthConfig) *string

GetImageID returns a Docker image ID given an image target (name:tag) and authentication info (if required). If the image is available locally, it returns the local image ID. Otherwise, it attempts to pull the image from a registry using the provided credentials. If credentials are not provided, it attempts to pull a public image.

func PullImageFromRegistry

func PullImageFromRegistry(target *string, credential *types.AuthConfig) *string

PullImageFromRegistry attempts to pull a Docker image of the given target from a registry, using the provided authentication credentials. If successful, it returns the image ID; otherwise it waits for timeout seconds and retries.

func PullPublicImage

func PullPublicImage(target *string) *string

PullPublicImage attempts to pull a public Docker image of the given target from Docker Hub. If successful, it returns the image ID; otherwise it waits for timeout seconds and retries.

func SaveImageToTar added in v1.3.1

func SaveImageToTar(image *string) *os.File

func UnTar added in v1.3.1

func UnTar(dst string, source string, recursive bool, contents *[]model.Location) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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