DWatchtower is a powerful, terminal-based User Interface (TUI) for dynamic analysis and monitoring of Docker containers in real time. It acts as an interactive sandbox viewer for security researchers, developers, and system administrators who want deep visibility into the internals of a running container without leaving the terminal.
DWatchtower provides a comprehensive suite of tools built into a tabbed interface. You can navigate through the features using the global shortcuts.
The central hub for starting new Docker sandbox environments. You can easily pull and run an image (like alpine or ubuntu). If you have a specific command to run in the sandbox, you can pass arguments directly via the CLI, e.g., sudo ./DWatchtower docker run -d ....
Real-time streaming of stdout and stderr directly from your sandboxed container.
- Filter/Search: Double-tap
/to focus the search bar, type your query, and hitEnterto filter the logs instantly. HitEscto clear.
Live monitoring of network traffic to and from the container. Under the hood, this uses nsenter and tcpdump to hook into the container's network namespace, capturing packets and translating them into readable network events.
- Filter: Double-tap
/to filter by Protocol (TCP/UDP) or IP address.
Traces container activity at the kernel level using strace. It observes crucial events like process execution (execve), file operations (open/openat), and socket connections.
- Threat Filter: Toggle with
Ctrl+Tto only show dangerous or suspicious syscalls. - Add Custom Syscall: Hit
Ctrl+Eto add custom syscalls to monitor dynamically.
Live tracking of running processes inside the sandbox (similar to docker top).
- Timeline Playback: DWatchtower records snapshots of the process tree. You can step backward (
<or,) and forward (>or.) through time to see how the process tree evolved during the container's lifecycle. HitRto return to live tracking.
Quick overview of the exposed container ports and how they map to your host machine.
Monitors and displays diffs/modifications made to the container's filesystem during its runtime. It tracks additions (A), changes (C), and deletions (D).
Exposes the raw container configuration, including environment variables, entrypoints, and mount bindings, in an easy-to-read format.
Drops you into a fully functional, interactive shell (bash or sh) directly inside the running container, all within the TUI tab.
Alt+0toAlt+8: Instantly jump to a specific tab.Alt+Left/Alt+Right: Smoothly navigate between tabs.Ctrl+C: Safely request exit (will prompt to remove the running sandbox container before quitting).//(Double-tap/): Focus the search/filter bar in supported tabs (Logs, Network, System, FS).
To take full advantage of DWatchtower, the host system requires the following:
- Docker Engine (with permissions to communicate with the docker socket)
nsenter: Used to enter the container's namespaces.tcpdump: Used for the Network tab capture.strace: Used for the System tab syscall monitoring.
Note: Since DWatchtower attaches to namespaces and traces system calls, it often needs to be run with sudo or as root depending on your host configuration.
-
Build the binary:
go build -o DWatchtower main.go
-
Run it: Launch the interactive UI:
sudo ./DWatchtower
Or pass Docker run arguments directly:
sudo ./DWatchtower docker run -d my-suspicious-image
-
Explore the tabs, monitor the sandbox, and hit
Ctrl+Cwhen you're done!
