github.com/afein/docker@v1.8.2/daemon/pause.go (about) 1 package daemon 2 3 import "fmt" 4 5 // ContainerPause pauses a container 6 func (daemon *Daemon) ContainerPause(name string) error { 7 container, err := daemon.Get(name) 8 if err != nil { 9 return err 10 } 11 12 if err := container.Pause(); err != nil { 13 return fmt.Errorf("Cannot pause container %s: %s", name, err) 14 } 15 16 return nil 17 }