Documentation ¶
Index ¶
- func BuildCompleteDockerImage(imageName, imageTag string) string
- func CheckDockerDaemon(cli DockerClient, ctx *context.Context) error
- func CheckDockerDaemonRunning(cli DockerClient, ctx *context.Context) bool
- func EncodeRegistryAuth(username, password string) string
- func NormalizeImageName(imageName string) (string, error)
- func ParseDockerImageName(imageRef string) string
- func ParseDockerImageNameAndTag(imageRef string) (dockerImageName, dockerImageTag string)
- func ParseDockerImageTag(imageRef string) string
- func PullDockerImage(cli DockerClient, ctx *context.Context, imageName, imageTag string, ...) error
- func PushDockerImage(cli DockerClient, ctx *context.Context, imageName, imageTag string, ...) error
- func StartDockerDaemon(cli DockerClient, ctx *context.Context) error
- func TagDockerImage(cli DockerClient, ctx *context.Context, ...) error
- type DockerClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCompleteDockerImage ¶
BuildCompleteDockerImage - Build the complete Docker image name from name and tag
func CheckDockerDaemon ¶
func CheckDockerDaemon(cli DockerClient, ctx *context.Context) error
CheckDockerDaemon - Check wheather the Docker daemon is running, if the method starts it
func CheckDockerDaemonRunning ¶
func CheckDockerDaemonRunning(cli DockerClient, ctx *context.Context) bool
CheckDockerDaemonRunning - Check wheather the Docker daemon is running (making a simple request)
func EncodeRegistryAuth ¶
EncodeRegistryAuth -- take username and password and create a string to be passed as RegistryAuth parameter
func NormalizeImageName ¶
NormalizeImageName - Normalize Docker image names to canonical WARN: Normalizing a Docker image reference in the form name:tag will output always name:latest
func ParseDockerImageName ¶
ParseDockerImageName - Retrieve Docker image name from a string
func ParseDockerImageNameAndTag ¶
ParseDockerImageNameAndTag - Retrieve Docker image name and tag from a string
func ParseDockerImageTag ¶
ParseDockerImageTag - Retrieve Docker image tag from a string
func PullDockerImage ¶
func PullDockerImage(cli DockerClient, ctx *context.Context, imageName, imageTag string, options *types.ImagePullOptions, normalize bool) error
PullDockerImage - Pull Docker image
func PushDockerImage ¶
func PushDockerImage(cli DockerClient, ctx *context.Context, imageName, imageTag string, options *types.ImagePushOptions) error
PushDockerImage - Push Docker image to Docker registry
func StartDockerDaemon ¶
func StartDockerDaemon(cli DockerClient, ctx *context.Context) error
StartDockerDaemon - Start up the Docker deamon based on the current OS
func TagDockerImage ¶
func TagDockerImage(cli DockerClient, ctx *context.Context, imageName, imageTag, imageNameNew, imageTagNew string) error
TagDockerImage - Tag Docker image
Types ¶
type DockerClient ¶
type DockerClient interface { ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error) ImagePull(ctx context.Context, refStr string, options types.ImagePullOptions) (io.ReadCloser, error) ImagePush(ctx context.Context, image string, options types.ImagePushOptions) (io.ReadCloser, error) ImageTag(ctx context.Context, source, target string) error Close() error }
DockerClient - interface for all functionality required from the docker client
func OpenDockerClient ¶
func OpenDockerClient() (DockerClient, error)
OpenDockerClient - Create new Docker client