Karma native file watcher and Docker container interoperability
0 reputation · 01 Sept 2025, 01:54 UTC
Goal
Determine whether Karma's native file watcher can reliably emit file-change events inside a Docker-based CI container when autoWatch is enabled, or whether the project should switch to single-run mode for headless CI execution.
Constraints and uncertainty
Karma's watcher depends on OS-native APIs such as inotify on Linux, which may not propagate events consistently inside containers. Production CI typically has no interactive terminal, so a watcher that works locally can appear to hang or silently skip tests. The ChromeHeadless launcher also requires the installed Chrome binary and ChromeDriver to match, but version alignment between local and production images is not guaranteed.
Assumptions: Karma 6.x, Node.js 18 or 20, karma-chrome-launcher.
- Does Karma's native file watcher emit change events inside a Docker container with
autoWatch: true? - Should CI configurations disable
autoWatchand usesingleRun: trueinstead of relying on watcher events? - What Chrome and ChromeDriver version alignment is required for the launcher to start reliably in CI?