cleanup attach api calls

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: a77b7dd2278106b9081d0ef2260fbeea790a91ef
Component: engine
This commit is contained in:
Brian Goff
2016-01-05 16:23:24 -05:00
parent d949b11a4e
commit 26a1a8c70f
6 changed files with 91 additions and 77 deletions

View File

@ -106,7 +106,7 @@ type Backend interface {
// Pull tells Docker to pull image referenced by `name`.
PullOnBuild(name string, authConfigs map[string]types.AuthConfig, output io.Writer) (Image, error)
// ContainerAttach attaches to container.
ContainerAttachOnBuild(cID string, stdin io.ReadCloser, stdout, stderr io.Writer, stream bool) error
ContainerAttachRaw(cID string, stdin io.ReadCloser, stdout, stderr io.Writer, stream bool) error
// ContainerCreate creates a new Docker container and returns potential warnings
ContainerCreate(types.ContainerCreateConfig) (types.ContainerCreateResponse, error)
// ContainerRm removes a container specified by `id`.

View File

@ -541,7 +541,7 @@ func (b *Builder) create() (string, error) {
func (b *Builder) run(cID string) (err error) {
errCh := make(chan error)
go func() {
errCh <- b.docker.ContainerAttachOnBuild(cID, nil, b.Stdout, b.Stderr, true)
errCh <- b.docker.ContainerAttachRaw(cID, nil, b.Stdout, b.Stderr, true)
}()
finished := make(chan struct{})