code: func GenerateACI(layerNumber int, manhash string, layerData types.DockerImageData, dockerURL *common.ParsedDockerURL, outputDir string, layerFile *os.File, curPwl []string, compression common.Compression, debug log.Logger) (string, *schema.ImageManifest, error) {
  	manifest, err := GenerateManifest(layerData, manhash, dockerURL, debug)
  	if err != nil {
  		return "", nil, fmt.Errorf("error generating the manifest: %v", err)
  	}
  
  	imageName := strings.Replace(dockerURL.ImageName, "/", "-", -1)
  	aciPath := generateACIPath(outputDir, imageName, layerData.ID, dockerURL.Tag, layerData.OS, layerData.Architecture, layerNumber)
  
  	manifest, err = writeACI(layerFile, *manifest, curPwl, aciPath, compression)
  	if err != nil {
  		return "", nil, fmt.Errorf("error writing ACI: %v", err)
  	}
  
  	if err := ValidateACI(aciPath); err != nil {
  		return "", nil, fmt.Errorf("invalid ACI generated: %v", err)
  	}
  
  	return aciPath, manifest, nil
  }
docs: // GenerateACI takes a Docker layer and generates an ACI from it.