Fix the issue when docker exec a paused container, it will always hang.
Add the test case of this issue. Docker-DCO-1.1-Signed-off-by: Chen Chao <cc272309126@gmail.com> (github: cc272309126) Upstream-commit: 1bb02117db80e75f406f6c63d8d50680c1569019 Component: engine
This commit is contained in:
@ -98,7 +98,9 @@ func (d *Daemon) getActiveContainer(name string) (*Container, error) {
|
||||
if !container.IsRunning() {
|
||||
return nil, fmt.Errorf("Container %s is not running", name)
|
||||
}
|
||||
|
||||
if container.IsPaused() {
|
||||
return nil, fmt.Errorf("Container %s is paused, unpause the container before exec", name)
|
||||
}
|
||||
return container, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user