copy

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 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 NewDockerImageCopyCmd added in v0.5.0

func NewDockerImageCopyCmd(cli types.DockerClienter) *DockerImageCopyCmd

NewDockerImageCopyCmd return a DockerImageCopyCmd

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) AddTags added in v0.5.0

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

AddTag add a new copied image tag to tags list

func (*DockerImageCopyCmd) Run

Run performs the image copy

func (*DockerImageCopyCmd) WithRemoteSource added in v0.5.0

func (c *DockerImageCopyCmd) WithRemoteSource() *DockerImageCopyCmd

WithRemoteSource set to use remote source image to DockerImageCopyCmd

func (*DockerImageCopyCmd) WithRemoveAfterPush added in v0.5.0

func (c *DockerImageCopyCmd) WithRemoveAfterPush() *DockerImageCopyCmd

WithRemoveAfterPush set to remove source image once the image is pushed

func (*DockerImageCopyCmd) WithResponse added in v0.5.0

func (c *DockerImageCopyCmd) WithResponse(res types.Responser) *DockerImageCopyCmd

WithResponse set responser attribute to DockerImageCopyCmd

func (*DockerImageCopyCmd) WithSourceImage added in v0.6.0

func (c *DockerImageCopyCmd) WithSourceImage(source string) *DockerImageCopyCmd

WithSourceImage set tags to DockerImageCopyCmd

func (*DockerImageCopyCmd) WithTags added in v0.5.0

func (c *DockerImageCopyCmd) WithTags(tags []string) *DockerImageCopyCmd

WithTags set tags to DockerImageCopyCmd

func (*DockerImageCopyCmd) WithTargetImage added in v0.6.0

func (c *DockerImageCopyCmd) WithTargetImage(target string) *DockerImageCopyCmd

WithTargetImage set tags to DockerImageCopyCmd

func (*DockerImageCopyCmd) WithUseNormalizedNamed added in v0.5.0

func (c *DockerImageCopyCmd) WithUseNormalizedNamed() *DockerImageCopyCmd

WithUseNormalizedNamed set to use normalized named to DockerImageCopyCmd

Jump to

Keyboard shortcuts

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