DockTop is a modern, feature-rich terminal user interface for managing Docker containers. Built with Rust and Ratatui, it provides real-time monitoring, interactive wizards, and a beautiful interface inspired by btop.
- ๐จ Beautiful UI - Btop-inspired design with customizable themes
- ๐ Real-time Monitoring - Live CPU, memory, and network statistics
- ๐ Container Management - Start, stop, restart, and remove containers
- ๐ Animated Background - Relaxing fish tank animation
- ๐ ASCII Globe - Rotating Earth animation in the tools sidebar
- ๐ง Interactive Wizards - Step-by-step guides for:
- Quick Pull & Run containers
- Build from Dockerfile
- Docker Compose generation
- ๐งน Janitor - Clean up unused containers, images, and volumes
- โ๏ธ Settings System - Configure theme, refresh rate, and behavior directly in the app
- โก Eco Mode - Adaptive refresh rate to save CPU when idle
- ๐ Live Logs - Real-time container log streaming
- ๐ฏ Resource Allocation - Smart resource management for databases
- ๐จ Theme Support - Load custom btop-style themes
- Docker - Required for container management
- Rust (optional) - Will be installed automatically if missing
Clone the repository and run the installation script:
git clone https://github.com/mel-cell/docktop.git
cd docktop
chmod +x install.sh
./install.shThe installation script will:
- โ Check for Rust and install it if needed
- โ Check for Docker (warns if missing)
- โ Build the project in release mode
- โ
Install the binary to
/usr/local/bin/docktop
If you prefer to install manually:
# Build the project
cargo build --release
# Copy the binary to your PATH
sudo cp target/release/docktop /usr/local/bin/docktop
# Or install to user directory
cp target/release/docktop ~/.cargo/bin/docktopSimply run docktop from anywhere in your terminal:
docktopโ/โorj/k- Navigate containersTab- Switch between sections / Open Tools Menu?- Open Help / Shortcuts MenuqorCtrl+C- Quit application
Enter- View container detailss- Start containert- Stop containerr- Restart containerd- Remove containery- Edit container config (YAML)l- View logsF5- Force refresh container list
Tab- Open wizard menuEsc- Cancel/Go backEnter- Confirm selectionCtrl+A- Toggle Advanced Options (in Wizard)Space- Cycle options (e.g., Restart Policy in Wizard)
DockTop comes with a built-in self-update mechanism. To update to the latest version:
docktop updateThis command will check for the latest release on GitHub, download the binary, and replace the current installation.
You can configure DockTop directly within the application:
- Press
Tabto open the Tools menu. - Select Settings.
- Use
Up/Downto navigate andLeft/Rightto change values. - Press
Sto save orEscto cancel.
DockTop stores configuration in config.toml (in the current directory or ~/.config/docktop/config.toml):
# DockTop Configuration
theme = "monochrome"
show_braille = true
refresh_rate_ms = 1000
confirm_before_delete = true
default_socket = "unix:///var/run/docker.sock"DockTop supports btop-style themes. Create or modify theme files in the themes/ directory:
themes/
โโโ monochrome.theme
โโโ dracula.theme
โโโ matrix.theme
โโโ custom.theme# Theme colors
theme[main_bg]="#00"
theme[main_fg]="#cc"
# ... (standard btop theme format)Quickly pull and run containers from Docker Hub:
- Press
Tabto open the wizard menu - Select "Quick Pull & Run"
- Enter image name (e.g.,
nginx:latest) - Configure ports, environment variables, and resources
- Press Enter to launch
Build and run from local Dockerfile:
- Press
Tabto open the wizard menu - Select "Build from Source"
- Browse to your project directory
- DockTop will auto-detect the framework (Node.js, Python, Go, etc.)
- Configure build settings and run
Generate production-ready docker-compose.yml files:
- Press
Tabto open the wizard menu - Select "Docker Compose"
- Choose your services (databases, caches, etc.)
- DockTop automatically calculates optimal resource allocation
- Review and save the generated compose file
Clean up unused resources:
- Press
Tabto open the wizard menu - Select "Janitor"
- Scan for dangling images, stopped containers, and unused volumes
- Select items to clean and confirm
- CPU Usage - Per-container CPU utilization with history graphs
- Memory - RAM usage with detailed breakdowns
- Network - RX/TX bandwidth monitoring
- Disk I/O - Read/write statistics
View comprehensive information about each container:
- Container ID and Name
- Image and Tag
- Status and Uptime
- Port Mappings
- Environment Variables
- Volume Mounts
- Network Configuration
Real-time log viewing with:
- Auto-scroll
- Color-coded output
- Search and filter (coming soon)
- Export logs (coming soon)
# Clone the repository
git clone https://github.com/yourusername/docktop.git
cd docktop
# Build in debug mode
cargo build
# Run in development
cargo run
# Build optimized release
cargo build --releasedocktop/
โโโ src/
โ โโโ main.rs # Entry point
โ โโโ app.rs # Application state and logic
โ โโโ ui.rs # UI rendering
โ โโโ docker.rs # Docker API integration
โ โโโ theme.rs # Theme parsing and management
โโโ assets/
โ โโโ earthAnimation.bat # ASCII globe animation
โโโ themes/ # Theme files
โโโ install.sh # Installation script
โโโ Cargo.toml # Dependencies
- tokio - Async runtime
- ratatui - TUI framework
- crossterm - Terminal manipulation
- bollard - Docker API client
- serde - Serialization
- sysinfo - System information
- chrono - Date/time handling
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For questions, suggestions, or issues, please open an issue on GitHub.
Made with โค๏ธ and ๐ฆ Rust
