Fix docker commit make a paused container to unpaused. Closes #10932

Signed-off-by: Lei Jitang <leijitang@huawei.com>
This commit is contained in:
Lei Jitang
2015-02-24 03:28:40 -08:00
parent f207dd5e7c
commit 7c7c7f84dc
2 changed files with 39 additions and 1 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ func (daemon *Daemon) ContainerCommit(job *engine.Job) engine.Status {
// Commit creates a new filesystem image from the current state of a container.
// The image can optionally be tagged into a repository
func (daemon *Daemon) Commit(container *Container, repository, tag, comment, author string, pause bool, config *runconfig.Config) (*image.Image, error) {
if pause {
if pause && !container.IsPaused() {
container.Pause()
defer container.Unpause()
}