Only stream logs when container is running

Upstream-commit: 3ddbb36a84d5530b1f6b496ff8d79ade6f539267
Component: engine
This commit is contained in:
Silas Sewell
2013-12-03 07:17:07 +00:00
parent 1b165a51bf
commit edb20bb130

View File

@ -1530,7 +1530,7 @@ func (cli *DockerCli) CmdLogs(args ...string) error {
v.Set("logs", "1")
v.Set("stdout", "1")
v.Set("stderr", "1")
if *stream {
if *stream && container.State.Running {
v.Set("stream", "1")
}