code: func (daemon *Daemon) CheckpointCreate(name string, config types.CheckpointCreateOptions) error {
  	container, err := daemon.GetContainer(name)
  	if err != nil {
  		return err
  	}
  
  	if !container.IsRunning() {
  		return fmt.Errorf("Container %s not running", name)
  	}
  
  	if !validCheckpointNamePattern.MatchString(config.CheckpointID) {
  		return fmt.Errorf("Invalid checkpoint ID (%s), only %s are allowed", config.CheckpointID, validCheckpointNameChars)
  	}
  
  	checkpointDir, err := getCheckpointDir(config.CheckpointDir, config.CheckpointID, name, container.ID, container.CheckpointDir(), true)
  	if err != nil {
  		return fmt.Errorf("cannot checkpoint container %s: %s", name, err)
  	}
  
  	err = daemon.containerd.CreateCheckpoint(context.Background(), container.ID, checkpointDir, config.Exit)
  	if err != nil {
  		os.RemoveAll(checkpointDir)
  		return fmt.Errorf("Cannot checkpoint container %s: %s", name, err)
  	}
  
  	daemon.LogContainerEvent(container, "checkpoint")
  
  	return nil
  }
docs: // CheckpointCreate checkpoints the process running in a container with CRIU