builder/docker: show stderr if docker fails to run

This commit is contained in:
Mitchell Hashimoto 2013-11-09 17:27:30 -08:00
parent 3bbe7024cd
commit 2851e188e1

View File

@ -67,6 +67,11 @@ func (d *DockerDriver) StartContainer(config *ContainerConfig) (string, error) {
log.Println("Waiting for container to finish starting")
if err := cmd.Wait(); err != nil {
if _, ok := err.(*exec.ExitError); ok {
err = fmt.Errorf("Docker exited with a non-zero exit status.\nStderr: %s",
stderr.String())
}
return "", err
}