docker

package
v0.0.0-...-e679083 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 15 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.CreateResponse, 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, options container.StopOptions) 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