Terminal UI for real-time Docker container monitoring and management
2.2K
An interactive terminal dashboard for monitoring and managing Docker containers and Docker Compose environments.
DockTUI is a terminal user interface (TUI) that provides a real-time dashboard for your Docker containers, similar to Docker Desktop but in your terminal. It lets you monitor container status, view logs, manage containers and stacks, and track resource usage - all with simple keyboard shortcuts.
docker compose command)Note: No Python or other dependencies required! DockTUI runs entirely in Docker.
# Clone and run
git clone https://github.com/dialmaster/DockTUI.git
cd DockTUI
./start.sh
That's it! The script automatically pulls and runs DockTUI from Docker Hub.
./start.sh # Run latest version
./start.sh -d # Run with debug logging
./start.sh -u # Update to latest version
./start.sh -v 1.0.0 # Run specific version
./start.sh -h # Show help
-u flag to get latest version-v/host inside the container so compose files are found wherever they live.Limitation: Recreating a service that must be built from source (
build:without a prebuilt image) is not supported from inside the container, because the build context is only readable through the read-only mount. Run DockTUI directly (see the developer setup) for that case.
If you would rather not clone the repository, the same container can be started by hand. Mount the Docker socket, the host filesystem (read-only) and your home directory at the same path:
docker run --rm -it \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /:/host:ro \
-v "$HOME:$HOME:ro" \
-e DOCKTUI_HOST_ROOT=/host \
--user "$(id -u):$(id -g)" --group-add "$(getent group docker | cut -d: -f3)" \
dialmaster/docktui:latest
start.sh adds clipboard syncing, macOS socket detection and debug logging on top of this.
If you want to contribute or run DockTUI without Docker, see DEVELOPMENT.md for Python/Poetry setup instructions.
Everything can be driven from the keyboard; the mouse is optional.
↑/↓ - Move through section headers, stacks, containers, images, volumes and networks. The selection (and the log pane) follows the cursor.Enter or Space - Expand/collapse the focused section, stack or network. On a row of a network's container table, Enter jumps to that container.←/→ - Collapse/expand the focused item (← on a container row collapses its stack)Home/End, PgUp/PgDn - Jump within a tableTab / Shift+Tab - Cycle focus: container list → log viewer → filter box → follow → mark → tail/since selectorsq - Quit/ - Jump to the log filter box (from anywhere)Esc - Return to the container listf - Toggle auto-followm - Mark the current log position with a timestampx - Expand/collapse JSON/XML on the line at the top of the viewc / Ctrl+Shift+C - Copy the selection, a / Ctrl+A - Select alls - Startt - Stop (with 't' for 'terminate')e - Restartu - Recreate (docker compose up -d)d - Docker compose downr - Remove selected stopped/exited containerr - Remove selected unused imageR - Remove all unused images (works regardless of selection)r - Remove selected volume (when not in use)p - Prune all unused volumes (works regardless of selection)Ctrl+\ - Open command paletteIf a container or stack operation fails, the daemon's error message is shown in the status area above the container list.
/pattern/ syntax)DockTUI displays volumes in a table format showing:
Volumes in use are shown first and cannot be removed. The status bar shows detailed information about which containers are using the selected volume.
DockTUI can be customized through a YAML configuration file. A default DockTUI.yaml is included.
DockTUI looks for configuration in this order:
DOCKTUI_CONFIG environment variable./DockTUI.yaml (included default)~/.config/DockTUI/DockTUI.yamlapp:
refresh_interval: 5.0 # How often to update container stats (seconds)
log:
max_lines: 4000 # Max log lines to keep in memory
tail: 400 # Initial lines to show when opening logs
since: '30m' # Time range for logs (e.g., '15m', '1h', '24h')
The log viewer uses advanced optimization techniques:
For containers with lots of logs:
tail (e.g., 100) and since (e.g., '5m')tail (e.g., 1000) and since (e.g., '1h')max_lines to control memory usage (default: 4000)Override configuration with environment variables:
# Change refresh rate
export DOCKTUI_APP_REFRESH_INTERVAL=10.0
# Adjust log settings
export DOCKTUI_LOG_TAIL=500
export DOCKTUI_LOG_SINCE=1h
./start.sh
DockTUI automatically handles clipboard integration. Selected text from logs can be copied to your system clipboard with:
The dockerized version automatically syncs the clipboard with your host system.
"Cannot connect to Docker daemon"
docker ps"docker compose command not found"
docker compose commandClipboard not working
Performance issues with many containers
Enable detailed logging to troubleshoot issues:
./start.sh -d
Debug logs are saved to ./logs/DockTUI_debug.log.
See DEVELOPMENT.md for architecture details, development setup, and contribution guidelines.
MIT License - see LICENSE file for details
Built with:
Content type
Image
Digest
sha256:fae1d7545…
Size
118.6 MB
Last updated
19 days ago
docker pull dialmaster/docktui