2015-05-02 04:03:35 +03:00
|
|
|
package daemon
|
|
|
|
|
2015-09-16 21:56:26 +03:00
|
|
|
import (
|
2015-09-11 01:01:18 +03:00
|
|
|
"github.com/docker/docker/context"
|
2015-09-17 21:54:14 +03:00
|
|
|
derr "github.com/docker/docker/errors"
|
2015-09-16 21:56:26 +03:00
|
|
|
)
|
2015-05-02 04:03:35 +03:00
|
|
|
|
|
|
|
// ContainerUnpause unpauses a container
|
2015-09-11 01:01:18 +03:00
|
|
|
func (daemon *Daemon) ContainerUnpause(ctx context.Context, name string) error {
|
|
|
|
container, err := daemon.Get(ctx, name)
|
2015-05-02 04:03:35 +03:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
2015-09-11 01:01:18 +03:00
|
|
|
if err := container.unpause(ctx); err != nil {
|
2015-09-16 21:56:26 +03:00
|
|
|
return derr.ErrorCodeCantUnpause.WithArgs(name, err)
|
2015-05-02 04:03:35 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|