mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Only stream logs when container is running
This commit is contained in:
parent
62263967b9
commit
3ddbb36a84
1 changed files with 1 additions and 1 deletions
|
@ -1530,7 +1530,7 @@ func (cli *DockerCli) CmdLogs(args ...string) error {
|
||||||
v.Set("logs", "1")
|
v.Set("logs", "1")
|
||||||
v.Set("stdout", "1")
|
v.Set("stdout", "1")
|
||||||
v.Set("stderr", "1")
|
v.Set("stderr", "1")
|
||||||
if *stream {
|
if *stream && container.State.Running {
|
||||||
v.Set("stream", "1")
|
v.Set("stream", "1")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue