Skip to content
This repository was archived by the owner on Nov 3, 2025. It is now read-only.

amir20/dtui

Repository files navigation

Docker Monitor

A terminal-based Docker container monitoring tool built with Rust. This is a complete rewrite of amir20/dtop in Rust.

Status: Currently in active development. The project is working toward feature parity with the original dtop. Some features may be incomplete or missing.

Monitor CPU and memory usage of your Docker containers in real-time with a beautiful TUI interface.

Features

  • Real-time monitoring of Docker container metrics (CPU, Memory)
  • Terminal User Interface (TUI) with keyboard navigation
  • Support for local Docker daemon
  • SSH support for remote Docker hosts
  • Lightweight and fast
  • Cross-platform (Linux, macOS, Windows)

Installation

Download Pre-built Binaries

Download the latest release for your platform from the Releases page:

  • Linux x86_64 (Intel/AMD)
  • Linux ARM64 (Raspberry Pi, ARM servers)
  • macOS x86_64 (Intel Macs)
  • macOS ARM64 (Apple Silicon M1/M2/M3)
# Extract the archive
tar xzf docker-monitor-<platform>.tar.gz

# Make it executable
chmod +x docker-monitor

# Move to your PATH (optional)
sudo mv docker-monitor /usr/local/bin/

Build from Source

Requires Rust 1.70 or later.

git clone https://github.com/yourusername/docker-monitor.git
cd docker-monitor
cargo build --release

The binary will be available at target/release/docker-monitor.

Usage

Monitor Local Docker Daemon

docker-monitor

or explicitly:

docker-monitor --host local

Monitor Remote Docker Host via SSH

# Default SSH port (22)
docker-monitor --host ssh://user@remote-host

# Custom SSH port
docker-monitor --host ssh://user@remote-host:2222

Monitor Remote Docker Host via TCP

# Connect to Docker daemon via TCP (port 2375 is typical for unencrypted)
docker-monitor --host tcp://192.168.1.100:2375

# Note: TCP connections are unencrypted. Only use on trusted networks.

Monitor Multiple Hosts Simultaneously

docker-monitor --host local --host ssh://user@host1 --host tcp://192.168.1.100:2375

Using Configuration Files

Docker Monitor supports YAML configuration files for persistent settings. Config files are searched in the following order (first found wins):

  1. ./config.yaml or ./config.yml (relative to current directory)
  2. ~/.config/dtui/config.yaml or ~/.config/dtui/config.yml
  3. ~/dtui.yaml or ~/dtui.yml

Example config.yaml:

hosts:
  - host: local
  - host: ssh://user@server1
  - host: tcp://192.168.1.100:2375
  - host: ssh://root@146.190.3.114
    dozzle: https://l.dozzle.dev/

Each host entry supports the following fields:

  • host: Docker connection string (required)
  • dozzle: URL to Dozzle instance for this host (optional, for future features)
  • More fields can be added in the future

Note: Command line arguments take precedence over config file values.

See config.example.yaml for a complete example.

Requirements

  • Docker daemon running locally or accessible via SSH
  • For SSH connections: SSH access to the remote host with Docker permissions

Architecture

Built with modern Rust async runtime and libraries:

  • Tokio - Async runtime
  • Ratatui - Terminal UI framework
  • Bollard - Docker API client with SSH support
  • Crossterm - Cross-platform terminal manipulation
  • Clap - Command-line argument parsing

Development

Running in Development

cargo run

Running with Arguments

# Local Docker
cargo run -- --host local

# Remote Docker via SSH
cargo run -- --host ssh://user@host

Building for Release

cargo build --release

CI/CD

This project uses GitHub Actions for continuous integration and deployment:

  • Pull Requests: Automatic builds for all platforms with artifacts attached to PR comments
  • Releases: Tag-based releases that automatically build and publish binaries for all platforms

This will trigger the release workflow and create a GitHub release with binaries for all supported platforms.

License

MIT License or Apache 2.0 (your choice)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Troubleshooting

Cannot connect to Docker daemon

Ensure Docker is running and your user has permissions to access the Docker socket:

# Linux: Add your user to the docker group
sudo usermod -aG docker $USER
# Log out and back in for changes to take effect

SSH connection fails

Ensure:

  • SSH access is configured correctly
  • Your SSH key is loaded (ssh-add)
  • The remote user has Docker permissions
  • The Docker daemon is running on the remote host

Roadmap

  • Container logs viewer
  • Container start/stop controls
  • Network and disk I/O metrics
  • Historical data graphs
  • Support for Docker Compose projects
  • Configuration file support
  • Custom refresh intervals

Acknowledgments

Built with excellent open-source libraries from the Rust ecosystem.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors