Sign inSign up

wuodan/watchpuppy

By wuodan

•Updated almost 2 years ago

Watchpuppy is built on top of Watchdog and inotifywait

Image
Developer tools
Monitoring & observability
0

1.4K

wuodan/watchpuppy repository overview

⁠Watchpuppy

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.

⁠Github repository

https://github.com/Wuodan/watchpuppy⁠

⁠Purpose

⁠Problem

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.

⁠Solution

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.

Tag summary

Content type

Image

Digest

sha256:a51a5405a…

Size

20.3 MB

Last updated

almost 2 years ago

docker pull wuodan/watchpuppy