Documentation
¶
Overview ¶
Package docker implements helper function for docker cli
Index ¶
- type DockerOptions
- func (do *DockerOptions) BuildImage(image, template, dirPath string) error
- func (do *DockerOptions) LoadImage(archiveFile string) error
- func (do *DockerOptions) PushImage(image string) error
- func (do *DockerOptions) SaveImage(image, archiveFile string) error
- func (do *DockerOptions) TagImage(existingImage, newImage string) error
- type DockerWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerOptions ¶
type DockerOptions struct{}
DockerOptions implements the DockerWrapper interface by using `docker` binary internally
func (*DockerOptions) BuildImage ¶
func (do *DockerOptions) BuildImage(image, template, dirPath string) error
BuildImage invokes `docker build -t <image> -f <template> <dirpath>` command
func (*DockerOptions) LoadImage ¶
func (do *DockerOptions) LoadImage(archiveFile string) error
LoadImage invokes `docker load -i <architefile>` command
func (*DockerOptions) PushImage ¶
func (do *DockerOptions) PushImage(image string) error
PushImage invokes `docker push <image>` command
func (*DockerOptions) SaveImage ¶
func (do *DockerOptions) SaveImage(image, archiveFile string) error
SaveImage invokes `docker save <image> | gzip -c > <archivefile>` command
func (*DockerOptions) TagImage ¶
func (do *DockerOptions) TagImage(existingImage, newImage string) error
TagImage invokes `docker tag <existingImage> <newImage>` command
type DockerWrapper ¶
type DockerWrapper interface { // BuildImage invokes `docker build -t <image> -f <template> <dirpath>` command BuildImage(image, template, dirPath string) error // SaveImage invokes `docker save <image> | gzip -c > <archivefile>` command SaveImage(image, archiveFile string) error // LoadImage invokes `docker load -i <architefile>` command LoadImage(archiveFile string) error // TagImage invokes `docker tag <existingImage> <newImage>` command TagImage(existingImage, newImage string) error // PushImage invokes `docker push <image>` command PushImage(image string) error }
DockerWrapper defines the docker command wrapper functions
func NewDockerCLIWrapper ¶
func NewDockerCLIWrapper() DockerWrapper
NewDockerCLIWrapper creates new DockerWrapper instance
Click to show internal directories.
Click to hide internal directories.