error out if checkpoint specified on non-experimental

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 3c0a2bb289994b190356a9753658e4cbe81a25bb
Component: engine
This commit is contained in:
Brian Goff
2016-10-27 17:43:57 -07:00
parent 52c41330fb
commit 4168a25419
+4
View File
@@ -20,6 +20,10 @@ import (
// ContainerStart starts a container.
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)
if err != nil {
return err