diff --git a/cluster/swarm/cluster.go b/cluster/swarm/cluster.go index e824ab67f0..5e9b048490 100644 --- a/cluster/swarm/cluster.go +++ b/cluster/swarm/cluster.go @@ -130,6 +130,10 @@ func (c *Cluster) createContainer(config *cluster.ContainerConfig, name string, return nil, err } + if container == nil { + return nil, errors.New("Container created but refresh didn't report it back") + } + st := &state.RequestedState{ ID: container.Id, Name: name,