Documentation ¶
Index ¶
- type DockerImageCopyCmd
- func (c *DockerImageCopyCmd) AddAuth(username, password string) error
- func (c *DockerImageCopyCmd) AddPullAuth(username, password string) error
- func (c *DockerImageCopyCmd) AddPushAuth(username, password string) error
- func (c *DockerImageCopyCmd) AddTag(tag ...string)
- func (c *DockerImageCopyCmd) Run(ctx context.Context) error
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
Click to show internal directories.
Click to hide internal directories.