code: func RunConfigCreate(dockerCli command.Cli, options CreateOptions) error {
  	client := dockerCli.Client()
  	ctx := context.Background()
  
  	var in io.Reader = dockerCli.In()
  	if options.File != "-" {
  		file, err := system.OpenSequential(options.File)
  		if err != nil {
  			return err
  		}
  		in = file
  		defer file.Close()
  	}
  
  	configData, err := ioutil.ReadAll(in)
  	if err != nil {
  		return errors.Errorf("Error reading content from %q: %v", options.File, err)
  	}
  
  	spec := swarm.ConfigSpec{
  		Annotations: swarm.Annotations{
  			Name:   options.Name,
  			Labels: opts.ConvertKVStringsToMap(options.Labels.GetAll()),
  		},
  		Data: configData,
  	}
  	if options.TemplateDriver != "" {
  		spec.Templating = &swarm.Driver{
  			Name: options.TemplateDriver,
  		}
  	}
  	r, err := client.ConfigCreate(ctx, spec)
  	if err != nil {
  		return err
  	}
  
  	fmt.Fprintln(dockerCli.Out(), r.ID)
  	return nil
  }
docs: // RunConfigCreate creates a config with the given options.