code: func checkDaemonIsSwarmManager(ctx context.Context, dockerCli command.Cli) error {
  	info, err := dockerCli.Client().Info(ctx)
  	if err != nil {
  		return err
  	}
  	if !info.Swarm.ControlAvailable {
  		return errors.New("this node is not a swarm manager. Use \"docker swarm init\" or \"docker swarm join\" to connect this node to swarm and try again")
  	}
  	return nil
  }
docs: // checkDaemonIsSwarmManager does an Info API call to verify that the daemon is
  // a swarm manager. This is necessary because we must create networks before we
  // create services, but the API call for creating a network does not return a
  // proper status code when it can't create a network in the "global" scope.