diff --git a/daemon/container.go b/daemon/container.go index 52830f72894cd..24af5945906d5 100644 --- a/daemon/container.go +++ b/daemon/container.go @@ -235,7 +235,7 @@ func (daemon *Daemon) setHostConfig(container *container.Container, hostConfig * runconfig.SetDefaultNetModeIfBlank(hostConfig) container.HostConfig = hostConfig - return container.CheckpointTo(daemon.containersReplica) + return nil } // verifyContainerSettings performs validation of the hostconfig and config diff --git a/daemon/start.go b/daemon/start.go index ecc0f8b8afccc..9d6f7812b67c7 100644 --- a/daemon/start.go +++ b/daemon/start.go @@ -67,9 +67,9 @@ func (daemon *Daemon) ContainerStart(name string, hostConfig *containertypes.Hos // if user has change the network mode on starting, clean up the // old networks. It is a deprecated feature and has been removed in Docker 1.12 ctr.NetworkSettings.Networks = nil - if err := ctr.CheckpointTo(daemon.containersReplica); err != nil { - return errdefs.System(err) - } + } + if err := ctr.CheckpointTo(daemon.containersReplica); err != nil { + return errdefs.System(err) } ctr.InitDNSHostConfig() }