mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix logs -f hanging on stopped containers
Fixes #7020 Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
This commit is contained in:
parent
366fe67946
commit
badf8247af
1 changed files with 1 additions and 1 deletions
|
@ -111,7 +111,7 @@ func (daemon *Daemon) ContainerLogs(job *engine.Job) engine.Status {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if follow {
|
if follow && container.State.IsRunning() {
|
||||||
errors := make(chan error, 2)
|
errors := make(chan error, 2)
|
||||||
if stdout {
|
if stdout {
|
||||||
stdoutPipe := container.StdoutLogPipe()
|
stdoutPipe := container.StdoutLogPipe()
|
||||||
|
|
Loading…
Add table
Reference in a new issue