copy

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerImageCopyCmd

type DockerImageCopyCmd struct {
	// Cli is the docker client to use
	Cli types.DockerClienter
	// ImagePushOptions from docker sdk
	ImagePullOptions *dockertypes.ImagePullOptions
	// ImagePushOptions from docker sdk
	ImagePushOptions *dockertypes.ImagePushOptions
	// SourceImage is the name of the image to be copied
	SourceImage string
	// TargetImage is the name of the copied image
	TargetImage string
	// Tags is a copied images tags list
	Tags []string
	// UseNormalizedNamed when is true tags are transformed to a fully qualified reference
	UseNormalizedNamed bool
	// RemoteSource when is true the source image is pulled from registry before push it to its destination
	RemoteSource bool
	// RemoveAfterPush when is true the image from local is removed after push
	RemoveAfterPush bool
	// Response manages the docker client output
	Response types.Responser
}

DockerCopyImageCmd is used to copy images to docker registry. Copy image is understood as tag an existing image and push it to a docker registry

func (*DockerImageCopyCmd) AddAuth

func (c *DockerImageCopyCmd) AddAuth(username, password string) error

AddAuth adds the same auth to image pull options and image push options

func (*DockerImageCopyCmd) AddPullAuth

func (c *DockerImageCopyCmd) AddPullAuth(username, password string) error

AddPullAuth adds auth to pull the source image from remote location

func (*DockerImageCopyCmd) AddPushAuth

func (c *DockerImageCopyCmd) AddPushAuth(username, password string) error

AddPushAuth adds auth to push the tagged image to its destination

func (*DockerImageCopyCmd) AddTag

func (c *DockerImageCopyCmd) AddTag(tag ...string)

AddTag add a new copied image tag to tags list

func (*DockerImageCopyCmd) Run

Run performs the image copy

Jump to

Keyboard shortcuts

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