code: func isValidEntrypoint(fs fs.FileSystem, path string) bool {
  	stat, err := fs.Stat(path)
  	if err != nil {
  		return false
  	}
  	found := false
  	for _, pattern := range validEntrypoints {
  		if pattern.MatchString(stat.Name()) {
  			found = true
  			break
  		}
  	}
  	if !found {
  		return false
  	}
  	mode := stat.Mode()
  	return mode&0111 != 0
  }
docs: // isValidEntrypoint checks if the given file exists and if it is a regular
  // file. Valid ENTRYPOINT must be an executable file, so the executable bit must
  // be set.