Documentation ¶
Overview ¶
Package containers provides utilities for interacting with Docker containers
Index ¶
- Variables
- func ContainerLogs(docker *docker.Client, opts LogOptions) (io.ReadCloser, error)
- func GetActiveContainers(docker *docker.Client) ([]types.Container, error)
- func Prune(docker *docker.Client) error
- func PruneAll(docker *docker.Client, exceptions ...string) error
- func StopActiveContainers(docker *docker.Client, out io.Writer) error
- func StreamContainerLogs(client *docker.Client, id string, out io.Writer, stop chan struct{}) error
- type ContainerStopper
- type LogOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoContainers is the response to indicate that no containers are active ErrNoContainers = errors.New("There are currently no active containers") )
Functions ¶
func ContainerLogs ¶
func ContainerLogs(docker *docker.Client, opts LogOptions) (io.ReadCloser, error)
ContainerLogs get logs ;)
func GetActiveContainers ¶
GetActiveContainers returns all active containers and returns and error if the Daemon is the only active container
func PruneAll ¶ added in v0.4.1
PruneAll forcibly removes all images except given exceptions (repo tag names)
func StopActiveContainers ¶
StopActiveContainers kills all active project containers (ie not including daemon)
Types ¶
type ContainerStopper ¶
ContainerStopper is a function interface
Click to show internal directories.
Click to hide internal directories.