docker

package
v0.0.0-...-af7b037 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FollowRun

func FollowRun(ctx context.Context, c Client, ID string) error

func RunContainer

func RunContainer(ctx context.Context, c Client, opts RunOpts) (string, error)

func Stop

func Stop(ctx context.Context, c Client, ID string, log func(...interface{})) func()

Types

type Client

type Client interface {
	ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig,
		networkingConfig *network.NetworkingConfig, platform *specs.Platform, containerName string) (container.ContainerCreateCreatedBody, error)
	ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error
	ContainerAttach(ctx context.Context, container string, options types.ContainerAttachOptions) (types.HijackedResponse, error)
	ContainerStop(ctx context.Context, containerID string, timeout *time.Duration) error
	ImagePull(ctx context.Context, refStr string, options types.ImagePullOptions) (io.ReadCloser, error)
}

type RunOpts

type RunOpts struct {
	Ports         map[string]string
	Envs          []string
	ContainerName string
	Image         string
	Commands      []string
	User          string
	Mounts        []mount.Mount
}

Directories

Path Synopsis
Package mock_docker is a generated GoMock package.
Package mock_docker is a generated GoMock package.

Jump to

Keyboard shortcuts

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