MCPcopy
hub / github.com/github/awesome-copilot / findDockerfile

Function findDockerfile

extensions/java-modernization-studio/scan.mjs:394–408  ·  view source on GitHub ↗
(repoPath)

Source from the content-addressed store, hash-verified

392}
393
394async function findDockerfile(repoPath) {
395 // Case-insensitive, and also accept Containerfile (Podman) / Dockerfile.<tag>.
396 if (await dirHasDockerfile(repoPath)) return true;
397 try {
398 const entries = await readdir(repoPath, { withFileTypes: true });
399 for (const e of entries) {
400 if (e.isDirectory() && !e.name.startsWith(".")) {
401 if (await dirHasDockerfile(join(repoPath, e.name))) return true;
402 }
403 }
404 } catch {
405 /* ignore */
406 }
407 return false;
408}
409
410// Directories we never descend into when unioning module build files.
411const SKIP_DIRS = new Set(["node_modules", "target", "build", "dist", "out", "bin", ".git"]);

Callers 1

buildAssessmentFunction · 0.85

Calls 1

dirHasDockerfileFunction · 0.85

Tested by

no test coverage detected