1
0
Fork 0
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:
Silas Sewell 2013-12-03 07:17:07 +00:00
parent 62263967b9
commit 3ddbb36a84

View file

@ -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")
} }