- func Run(client dockerclient.Client, conf *dockerclient.ContainerConfig, pull bool) (*dockerclient.ContainerInfo, error)
- func Start(client dockerclient.Client, conf *dockerclient.ContainerConfig, pull bool) (*dockerclient.ContainerInfo, error)
- func StdCopy(dstout, dsterr io.Writer, src io.Reader) (written int64, err error)
- type Client
- type StdType
- type StdWriter
const ( StdWriterPrefixLen = 8 StdWriterFdIndex = 0 StdWriterSizeIndex = 4 )
StdCopy is a modified version of io.Copy.
StdCopy will demultiplex `src`, assuming that it contains two streams, previously multiplexed together using a StdWriter instance. As it reads from `src`, StdCopy will write to `dstout` and `dsterr`.
StdCopy will read until it hits EOF on `src`. It will then return a nil error. In other words: if `err` is non nil, it indicates a real underlying error.
`written` will hold the total number of bytes written to `dstout` and `dsterr`.
Client is a wrapper around the default Docker client that tracks all created containers ensures some default configurations are in place.
func (*Client) CreateContainer ¶
CreateContainer creates a container and internally caches its container id.
Destroy will terminate and destroy all containers that were created by this client.