Only stream logs when container is running
Upstream-commit: 3ddbb36a84d5530b1f6b496ff8d79ade6f539267 Component: engine
This commit is contained in:
@ -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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user