diff --git a/daemon/create.go b/daemon/create.go index 62262792bd..5769fdb111 100644 --- a/daemon/create.go +++ b/daemon/create.go @@ -21,11 +21,12 @@ func (daemon *Daemon) ContainerCreate(name string, config *runconfig.Config, hos } warnings, err := daemon.verifyContainerSettings(hostConfig, config) - daemon.adaptContainerSettings(hostConfig, adjustCPUShares) if err != nil { return nil, warnings, err } + daemon.adaptContainerSettings(hostConfig, adjustCPUShares) + container, buildWarnings, err := daemon.Create(config, hostConfig, name) if err != nil { if daemon.Graph().IsNotExist(err, config.Image) {