mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Print the container id before the hijack in docker run
(see also #804)
This is useful when you want to get the container id before you start to interact with stdin (which is what I'm doing in dotcloud/sandbox).
This commit is contained in:
parent
7ef9833dbb
commit
7e6ede6379
1 changed files with 3 additions and 3 deletions
|
@ -1228,6 +1228,9 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if !config.AttachStdout && !config.AttachStderr {
|
||||
fmt.Println(out.ID)
|
||||
}
|
||||
if connections > 0 {
|
||||
chErrors := make(chan error, connections)
|
||||
cli.monitorTtySize(out.ID)
|
||||
|
@ -1262,9 +1265,6 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
|||
connections -= 1
|
||||
}
|
||||
}
|
||||
if !config.AttachStdout && !config.AttachStderr {
|
||||
fmt.Println(out.ID)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue