docker

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 19 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, dockerTemp *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, dockerTemp *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, hasTimeOut bool) *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, hasTimeOut bool) *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, hasTimeOut bool) *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, dockerTemp *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