docker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var K8sDockerVersions = map[string][]string{
	"1.8": {"1.12.6", "1.13.1", "17.03.2"},
}

Functions

func CreateContiner

func CreateContiner(ctx context.Context, dClient *client.Client, hostname string, containerName string, imageCfg *container.Config, hostCfg *container.HostConfig) (container.ContainerCreateCreatedBody, error)

func DoRemoveContainer

func DoRemoveContainer(ctx context.Context, dClient *client.Client, containerName, hostname string) error

func DoRollingUpdateContainer

func DoRollingUpdateContainer(ctx context.Context, dClient *client.Client, imageCfg *container.Config, hostCfg *container.HostConfig, containerName, hostname, plane string) error

func DoRunContainer

func DoRunContainer(ctx context.Context, dClient *client.Client, imageCfg *container.Config, hostCfg *container.HostConfig, containerName string, hostname string, plane string) error

func InspectContainer

func InspectContainer(ctx context.Context, dClient *client.Client, hostname string, containerName string) (types.ContainerJSON, error)

func IsContainerRunning

func IsContainerRunning(ctx context.Context, dClient *client.Client, hostname string, containerName string, all bool) (bool, error)

func IsContainerUpgradable

func IsContainerUpgradable(ctx context.Context, dClient *client.Client, imageCfg *container.Config, containerName string, hostname string, plane string) (bool, error)

func IsSupportedDockerVersion

func IsSupportedDockerVersion(info types.Info, K8sVersion string) (bool, error)

func ReadContainerLogs

func ReadContainerLogs(ctx context.Context, dClient *client.Client, containerName string) (io.ReadCloser, error)

func ReadFileFromContainer

func ReadFileFromContainer(ctx context.Context, dClient *client.Client, hostname, container, filePath string) (string, error)

func RemoveContainer

func RemoveContainer(ctx context.Context, dClient *client.Client, hostname string, containerName string) error

func RenameContainer

func RenameContainer(ctx context.Context, dClient *client.Client, hostname string, oldContainerName string, newContainerName string) error

func StartContainer

func StartContainer(ctx context.Context, dClient *client.Client, hostname string, containerName string) error

func StopContainer

func StopContainer(ctx context.Context, dClient *client.Client, hostname string, containerName string) error

func StopRenameContainer

func StopRenameContainer(ctx context.Context, dClient *client.Client, hostname string, oldContainerName string, newContainerName string) error

func UseLocalOrPull

func UseLocalOrPull(ctx context.Context, dClient *client.Client, hostname string, containerImage string, plane string) error

func WaitForContainer

func WaitForContainer(ctx context.Context, dClient *client.Client, containerName string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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