docker

package
v0.0.0-...-b274fa0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupContainer

func CleanupContainer(ctx context.Context, cli *dockerapi.Client, containerID string) error

func ContainerIP

func ContainerIP(cont types.ContainerJSON, netName string) (string, error)

func ContainerLogs

func ContainerLogs(ctx context.Context, cli *dockerapi.Client, id string, writer io.Writer) error

func CopyToContainer

func CopyToContainer(ctx context.Context, client *dockerapi.Client, containerID, from, to string) error

func SetupNetwork

func SetupNetwork(ctx context.Context, cli *dockerapi.Client, netName, cidr string) (*types.NetworkResource, error)

Create a docker private network or if one already exists with the name netName, use that one.

func Start

func Start(ctx context.Context, client *dockerapi.Client, opts RunOptions) (*types.ContainerJSON, error)

func Wait

func Wait(api *dockerapi.Client, containerID string) error

Types

type RunOptions

type RunOptions struct {
	ContainerConfig *container.Config
	ContainerName   string
	NetName         string
	IP              string
	Privileged      bool
	CopyFromTo      map[string]string
}

Jump to

Keyboard shortcuts

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