docker

package
v0.0.0-...-a2a535d Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIfContainerAllocatesPort

func CheckIfContainerAllocatesPort(ctx context.Context, cli *client.Client, port int) (bool, error)

func CheckIfContainerExists

func CheckIfContainerExists(ctx context.Context, cli *client.Client, containerName string) (bool, error)

func CheckIfImageExists

func CheckIfImageExists(ctx context.Context, cli *client.Client, imageName string) (bool, error)

func CreateDockerContainer

func CreateDockerContainer(ctx context.Context, cli *client.Client, containerName string, config *container.Config, hostConfig *container.HostConfig) error

func ExecDockerContainer

func ExecDockerContainer(ctx context.Context, cli *client.Client, containerName string, cmd []string) ([]string, error)

func GetAllDockerContainers

func GetAllDockerContainers(ctx context.Context, cli *client.Client) ([]types.Container, error)

func GetDockerClient

func GetDockerClient() (*client.Client, error)

func GetDockerContainers

func GetDockerContainers(ctx context.Context, cli *client.Client, listOptions types.ContainerListOptions) ([]types.Container, error)

func GetDockerImages

func GetDockerImages(ctx context.Context, cli *client.Client) ([]types.ImageSummary, error)

func GetRunningDockerContainers

func GetRunningDockerContainers(ctx context.Context, cli *client.Client) ([]types.Container, error)

func PullDockerImage

func PullDockerImage(ctx context.Context, cli *client.Client, imageName string) error

func RemoveDockerContainer

func RemoveDockerContainer(ctx context.Context, cli *client.Client, containerName string) error

func RunDockerContainer

func RunDockerContainer(ctx context.Context, cli *client.Client, containerName string, opts types.ContainerStartOptions) error

func StopDockerContainer

func StopDockerContainer(ctx context.Context, cli *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