mirror of https://github.com/docker/docs.git
Only stream logs when container is running
This commit is contained in:
parent
62263967b9
commit
3ddbb36a84
|
@ -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…
Reference in New Issue