A terminal UI tool for monitoring Docker containers, inspired by htop. Displays containers grouped by project with an interactive tree interface.
- Project Grouping: Automatically groups containers by their name prefix (Docker Compose convention)
- Tree Navigation: Expandable/collapsible project view
- Real-time Monitoring: Auto-refreshes container status every 2 seconds
- Interactive Actions: Context-aware menu system for managing containers
- Keyboard-driven: Full keyboard navigation with vim-style keybindings
- Viewport Scrolling: Efficient handling of hundreds of containers with automatic scrolling
- Sticky Footer: Help text always visible at bottom of screen
- Scroll Indicator: Shows current position when content exceeds screen height
- List Mode: Non-interactive output for scripts and CI/CD pipelines (
--list/-l) - Visual Progress Bars: CPU and memory usage displayed with inline bar graphs
- Network Monitoring: Real-time network I/O stats (RX/TX) for each container
go install github.com/ekinertac/dtop@latestThis installs dtop to your $GOPATH/bin directory (usually ~/go/bin).
If the command is not found after installation, add Go's bin directory to your PATH:
# For bash/zsh, add to ~/.bashrc or ~/.zshrc
export PATH="$PATH:$(go env GOPATH)/bin"
# Or if go command is not available, typically it's:
export PATH="$PATH:$HOME/go/bin"After adding the export line, restart your terminal or run source ~/.bashrc (or ~/.zshrc).
git clone https://github.com/ekinertac/dtop.git
cd dtop
go build -o dtopdtopLaunches the full interactive TUI with real-time monitoring and keyboard navigation.
dtop --list
# or short form
dtop -lLists current containers and exits immediately. Useful for:
- Shell scripts and automation
- CI/CD pipelines
- Quick status checks in non-interactive environments
- Logging/monitoring systems
Example output:
dtop - Docker Container Monitor
NAME STATUS CPU MEMORY NET RX/TX UPTIME
----------------------------------------------------------------------------------------------------------------------------------
▼ myproject (3)
myproject-web-1 Up 2 hours 33% ████░ 12% █░░░░ 1.2M/450K 02h 15m
myproject-db-1 Up 2 hours (healthy) 8% █░░░░ 5% ░░░░░ 621B/566B 02h 15m
myproject-worker-1 Up 2 hours 2% ░░░░░ 3% ░░░░░ 1.4K/890B 02h 15m
↑/k- Move up↓/j- Move downPgUp- Page upPgDn- Page downHome- Jump to topEnd- Jump to bottom←/h- Collapse project→/l- Expand projectEnter- Open action menuq/Ctrl+C- Quit
↑/↓- Select menu itemEnter- Execute actionEsc- Close menu
- Restart All - Restart all containers (
docker compose restart) - Stop All - Stop all running containers (
docker compose stop) - Down - Stop and remove all containers (
docker compose down, keeps volumes) - Start All - Start all stopped containers (
docker compose start)
- Restart - Restart the container (
docker restart) - Stop - Stop the container (
docker stop) - Remove - Remove the container (
docker rm, keeps volumes) - Logs - View container logs (last 1000 lines, scrollable)
Note: All operations preserve volumes by default. To remove volumes, use docker volume rm or docker compose down --volumes from the terminal.
Project Grouping: dtop automatically groups containers based on their naming convention:
myproject_web_1→ project:myprojectmyproject-db-1→ project:myproject- Standalone containers are shown under their own project name
Docker Integration: Uses Docker API directly for all operations, no docker-compose dependency required.
- Go 1.21+
- Docker running on local machine
- Docker socket accessible (typically
/var/run/docker.sock)
# Install dependencies
go mod download
# Build
go build
# Run
./dtopTo make your tool available via go install, push to GitHub:
# Initialize git if not already done
git init
git add .
git commit -m "Initial commit"
# Create repo on GitHub, then:
git remote add origin https://github.com/ekinertac/dtop.git
git branch -M main
git push -u origin main
# Create a release tag (optional, for versioning)
git tag v0.1.0
git push origin v0.1.0After pushing, others can install with:
go install github.com/ekinertac/dtop@latestInteractive monitoring:
dtopMonitor containers in real-time with keyboard control.
Scripts and automation:
# Check container status
dtop --list
# or
dtop -l
# Save to file
dtop -l > containers.txt
# Pipe to other tools
dtop -l | grep "myproject"
# CI/CD health check
if dtop -l | grep -q "Exit"; then
echo "Some containers are down!"
exit 1
fi- List mode for non-interactive use (
--list/-l) - Real-time CPU/Memory statistics with progress bars
- Network I/O monitoring (RX/TX per container)
- Log viewer with scrolling
- Container inspect view
- Exec into container
- Filter/search functionality
- Color themes
- Configuration file support
