mirror of
https://github.com/docker/docs.git
synced 2026-03-27 22:38:54 +07:00
Decouple daemon and container to pause and unpause containers.
Signed-off-by: David Calavera <david.calavera@gmail.com>
This commit is contained in:
@@ -22,8 +22,8 @@ type ContainerCommitConfig struct {
|
||||
// The image can optionally be tagged into a repository.
|
||||
func (daemon *Daemon) Commit(container *Container, c *ContainerCommitConfig) (*image.Image, error) {
|
||||
if c.Pause && !container.isPaused() {
|
||||
container.pause()
|
||||
defer container.unpause()
|
||||
daemon.containerPause(container)
|
||||
defer daemon.containerUnpause(container)
|
||||
}
|
||||
|
||||
rwTar, err := daemon.exportContainerRw(container)
|
||||
|
||||
Reference in New Issue
Block a user