Watchpuppy is built on top of Watchdog and inotifywait
1.4K
Watchpuppy is built on top of Watchdog and inotifywait
WatchPuppy combines inotify and Python polling for a seamless cross-platform file monitoring solution, dynamically adapting to the monitoring capabilities of shared folders and their file systems in Docker containers, supporting both Linux and Windows hosts.
https://github.com/Wuodan/watchpuppy
In Docker environments, monitoring file changes on shared or mounted volumes can be challenging. The native Linux inotify mechanism provides efficient, event-driven file monitoring, but many shared file systems (such as network file systems or those mounted from Windows hosts) do not support inotify. This limitation means that real-time file event notifications are unavailable on those file systems.
Watchpuppy automatically checks the file system type of the target directory to determine if inotify can be used. If inotify is supported, Watchpuppy uses inotifywait for efficient, real-time monitoring. If inotify isn’t available, it falls back to polling with Python’s watchdog library, which periodically checks for file changes.
While polling provides broad compatibility, it is not as efficient or reliable as event-driven monitoring and may miss rapid or transient changes. Despite these limitations, the fallback to polling allows to support consistent file monitoring across various host and file system types without additional configuration.
Content type
Image
Digest
sha256:a51a5405a…
Size
20.3 MB
Last updated
almost 2 years ago
docker pull wuodan/watchpuppy