docker_utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImageExistsLocally

func ImageExistsLocally(ctx context.Context, c *client.Client, image string) (bool, error)

func NetCreate

func NetCreate(ctx context.Context, client *client.Client, netName string, internal bool) (string, error)

func NetExists

func NetExists(ctx context.Context, client *client.Client, netName string) (bool, string, error)

func PullImage

func PullImage(ctx context.Context, c *client.Client, image string) error

func RemoveContainer

func RemoveContainer(ctx context.Context, c *client.Client, name string) error

func RemoveNetwork

func RemoveNetwork(ctx context.Context, c *client.Client, netName string) error

func RunAndWaitContainer

func RunAndWaitContainer(ctx context.Context, c *client.Client, config ContainerConfigs) error

Creates and starts a container and then waits for it to exit

func RunContainer

func RunContainer(ctx context.Context, c *client.Client, configs ContainerConfigs) error

Creates and starts a container and returns without waiting

Types

type ContainerConfigs

type ContainerConfigs struct {
	ContName   string
	Container  *container.Config
	Host       *container.HostConfig
	Networking *network.NetworkingConfig
}

Jump to

Keyboard shortcuts

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