containers

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach

Attach will return an attached response to a container.

func Create

Create will create a container, but will not run it.

func Exec

func Exec(ctx context.Context, client *client.Client, container string, command string) ([]byte, error)

Exec will run a command in a Docker container and return the output.

func Inspect

func Inspect(ctx context.Context, client *client.Client, container string) (container.InspectResponse, error)

Inspect will return the full container object.

func Kill

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

Kill will kill the container.

func List

func List(ctx context.Context, client *client.Client) ([]container.Summary, error)

List will return a slice of containers

func Logs

func Logs(ctx context.Context, client *client.Client, ID string) ([]byte, error)

Logs will synchronously (blocking, non-concurrently) print logs to stdout and stderr, useful for quick containers with a small amount of output which are expected to exit quickly.

func Remove

func Remove(ctx context.Context, client *client.Client, id string) error

Remove will remove the container. It will not remove the image.

func Start

func Start(ctx context.Context, client *client.Client, ID string, options containertypes.StartOptions) error

Start will run an existing container.

func Stop

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

Stop will stop the container.

func Wait

func Wait(ctx context.Context, client *client.Client, ID string, condition containertypes.WaitCondition) error

Wait will wait for the specificied container condition.

Types

This section is empty.

Jump to

Keyboard shortcuts

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