mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #27845 from cpuguy83/experimental_checks_daemon
error out if checkpoint specified on non-experimental
This commit is contained in:
commit
0aaef963a8
1 changed files with 4 additions and 0 deletions
|
@ -20,6 +20,10 @@ import (
|
||||||
|
|
||||||
// ContainerStart starts a container.
|
// ContainerStart starts a container.
|
||||||
func (daemon *Daemon) ContainerStart(name string, hostConfig *containertypes.HostConfig, validateHostname bool, checkpoint string) error {
|
func (daemon *Daemon) ContainerStart(name string, hostConfig *containertypes.HostConfig, validateHostname bool, checkpoint string) error {
|
||||||
|
if checkpoint != "" && !daemon.HasExperimental() {
|
||||||
|
return errors.NewBadRequestError(fmt.Errorf("checkpoint is only supported in experimental mode"))
|
||||||
|
}
|
||||||
|
|
||||||
container, err := daemon.GetContainer(name)
|
container, err := daemon.GetContainer(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue