Lazydocker Terminal UI for Docker
Lazydocker proporciona an intuitive terminal-based user interface for Docker management, streamlining common contenedor operations without memorizing complex CLI commands. Esta guía completa cubre installation, navigation, contenedor management, log viewing, statistics monitoring, keybindings customization, and configuration options. Lazydocker significantly improves Docker user experience, especially for system administrators and DevOps engineers working frequently with contenedores.
Tabla de Contenidos
- Comprendiendo Lazydocker
- Instalación and Configuración
- Interface Navigation
- Contenedor Gestión
- Imagen Operations
- Log Viewing and Monitoreo
- Statistics and Performance
- Keybindings and Customization
- Configuración File
- Conclusión
Comprendiendo Lazydocker
Lazydocker is a terminal UI for Docker written in Go, providing a visual interface for Docker operations including contenedor management, imagen handling, log viewing, and statistics monitoring. It eliminates the need to memorize Docker CLI commands for common operations.
Key features:
- Contenedor listing and management
- Real-time log viewing with filtering
- Contenedor statistics and resource monitoring
- Imagen management and operations
- Volumen browsing
- Red inspection
- Interactive commands with confirmation prompts
- Customizable keybindings and themes
- Cross-platform support (Linux, macOS, Windows WSL)
Interface components:
- Status bar: Shows current selection and available actions
- Contenedor/Imagen panel: List view with details
- Logs panel: Real-time log streaming
- Stats panel: Resource usage metrics
- Info panel: Detailed information about selected item
Instalación and Configuración
Instala Lazydocker on your system.
Instalación methods:
# macOS with Homebrew
brew install lazydocker
# Linux with curl
curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash
# Verifica installation
lazydocker --version
# Instala manually from releases
cd /tmp
wget https://github.com/jesseduffield/lazydocker/releases/download/v0.23.1/lazydocker_0.23.1_Linux_x86_64.tar.gz
tar -xzf lazydocker_0.23.1_Linux_x86_64.tar.gz
sudo mv lazydocker /usr/local/bin/
chmod +x /usr/local/bin/lazydocker
# Verifica
lazydocker --version
Building from source:
# Clone repositorio
git clone https://github.com/jesseduffield/lazydocker.git
cd lazydocker
# Build
go build -o lazydocker
# Instala
sudo mv lazydocker /usr/local/bin/
# Verifica
lazydocker --version
Configuración directory setup:
# Lazydocker creates config directory on first run
lazydocker
# Configuración location:
# Linux/macOS: ~/.config/lazydocker
# Windows: %APPDATA%\lazydocker
# Configuración files:
# - config.yml: Main configuration
# - state.yml: Saved UI state
# Verifica creation
ls -la ~/.config/lazydocker
Running Lazydocker:
# Inicia Lazydocker
lazydocker
# Specify log level
lazydocker --log-level=debug
# Use alternative config file
lazydocker --config=/path/to/config.yml
# Specify contenedor name to focus on
lazydocker --filter=myapp
# Exit with 'q' or Escape
Interface Navigation
Navigate Lazydocker's terminal user interface.
Main panels:
# Lazydocker shows multiple panels:
# 1. Contenedores panel (default)
# - Lists all contenedores
# - Shows status (running, exited, etc.)
# - Highlight selected contenedor
# 2. Imágenes panel
# - Lists all imágenes
# - Shows repositorio, tag, size
# - Filtra by name
# 3. Logs panel
# - Real-time log streaming
# - Tail or scroll
# - Timestamp display
# 4. Stats panel
# - CPU usage
# - Memory usage
# - Red I/O
# - Bloquea I/O
# 5. Volúmenes panel
# - List volúmenes
# - Inspect mount points
Tab navigation:
# Press Tab or number keys to switch panels:
# 1 - Contenedores
# 2 - Imágenes
# 3 - Volúmenes
# 4 - Redes
# 5 - Stats
# 6 - Logs
# Use arrow keys to navigate items in each panel
# Up/Down: Navigate list
# Left/Right: Switch panels
# Enter: Select item and show details
# Space: Show detail view (logs, stats, etc.)
Quick view operations:
# Common navigation patterns:
# View contenedor logs:
# 1. Navigate to contenedor (Tab + arrow keys)
# 2. Press 'l' to view logs
# 3. Scroll with Page Up/Down or mouse
# 4. 'q' to exit logs view
# View contenedor stats:
# 1. Select contenedor
# 2. Press 's' for stats
# 3. Watch real-time metrics
# 4. 'q' to exit
# View contenedor details:
# 1. Select contenedor
# 2. Press 'e' for environment
# 3. 'i' for inspect (full config)
# 4. 'q' to exit
Contenedor Gestión
Perform common contenedor operations from Lazydocker.
Basic contenedor operations:
# Within Lazydocker UI:
# Inicia contenedor: Press 's' on stopped contenedor
# Detén contenedor: Press 's' on running contenedor
# Remueve contenedor: Press 'd' (with confirmation)
# Reinicia contenedor: Press 'r'
# Ejecuta command in contenedor:
# Press 'e' to open exec dialog
# Type command (e.g., 'ls -la')
# Press Enter to execute
# View output in popup
# Attach to contenedor:
# Press 'a' to attach interactive shell
# Type commands as if in contenedor
# Ctrl+C to detach
Contenedor sorting and filtering:
# Filtra contenedores:
# Press '/' or Ctrl+F to open filter dialog
# Type filter pattern (matches name or ID)
# Press Enter to apply
# Press Escape to clear filter
# Example filters:
# 'prod' - Shows only contenedores with 'prod' in name
# 'running' - Shows only running contenedores
# 'exited' - Shows only stopped contenedores
# Sort contenedores:
# Press 's' for sort options
# Sort by: Name, Status, Created, Size
# Note: Filtra operates on visible list
# For status-based filtering, use config
Bulk operations:
# Within contenedores panel:
# Detén all contenedores:
# 1. No direct 'stop all' button
# 2. Use command mode: Press ':' then 'docker ps -q | xargs docker stop'
# 3. Or: Select contenedor -> s, Repeat for each
# Prune unused contenedores:
# Within Docker panel, Docker menu:
# 1. Press 'D' for Docker menu
# 2. Select 'Prune contenedores'
# 3. Confirm action
# View all contenedores (including exited):
# Press 'a' to toggle showing all contenedores
# Default: Shows only running
Imagen Operations
Manage Docker imágenes through Lazydocker.
Imagen listing and inspection:
# Switch to Imágenes tab (press '2')
# View available imágenes
# Select imagen with arrow keys
# Press 'i' to inspect imagen details
# Imagen information shown:
# - Repositorio and tag
# - Imagen ID
# - Size
# - Created date
# - Capas
# - Environment variables
Imagen operations:
# Remueve imagen: Press 'd' on selected imagen
# Tag imagen: Press 't' to open tag dialog
# Build imagen: Press 'b' to build from Dockerfile
# Search Docker Hub:
# Press 's' in imágenes panel
# Type imagen name to search
# Select and pull
# Pull imagen:
# Press 'p' to open pull dialog
# Enter imagen name:tag
# Press Enter to pull
# View progress in popup
Prune and cleanup:
# Access Docker menu:
# Press 'D' (capital D)
# Options shown:
# - Prune contenedores (remove exited)
# - Prune imágenes (remove dangling)
# - Prune volúmenes (remove unused)
# - Prune redes (remove unused)
# Confirm each action
# View cleanup summary
Log Viewing and Monitoreo
Access and analyze contenedor logs.
View contenedor logs:
# From Contenedores panel:
# 1. Select contenedor
# 2. Press 'l' to view logs
# 3. View real-time log stream
# Log viewer features:
# - Timestamp display: 't' toggle
# - Follow mode: 'f' toggle
# - Clear logs: 'c' (clears display, not actual logs)
# - Search: '/' to find text in logs
# - Page navigation: Page Up/Down or mouse scroll
Log filtering and search:
# Search within logs:
# Press '/' to open search
# Type search term
# Navigate matches with 'n' (next) or 'p' (previous)
# Escape to exit search
# Filtra log lines:
# In log view, press 'f'
# Enter filter pattern (regex supported)
# View only matching lines
# Examples:
# 'ERROR' - Show only error lines
# 'INFO.*database' - Show INFO lines with database
Log output format:
# Customize log display:
# - Timestamps: 't' toggle on/off
# - Colors: Preserved from contenedor output
# - Line wrapping: Handled automatically
# - Scroll position: Saved when viewing other contenedores
# Follow multiple contenedores:
# Lazydocker follows single contenedor at a time
# Switch between contenedores to view their logs
# Scroll history maintained per contenedor
Statistics and Performance
Monitorea contenedor resource usage.
View real-time statistics:
# Access Statistics tab:
# Press Tab until on Stats panel
# Or press '5'
# Metrics displayed:
# - CPU: Percentage of available CPU
# - Memory: Current and limit
# - Red I/O: Bytes sent/received
# - Bloquea I/O: Disk read/write bytes
# Stats refresh: Auto-updates (typically 1-2 second interval)
# All running contenedores shown simultaneously
# Select contenedor to focus stats
# Arrow keys navigate contenedor list
Performance monitoring workflow:
# Monitorea single contenedor:
# 1. Go to Contenedores tab
# 2. Select contenedor
# 3. Press 's' for stats detail
# 4. View focused metrics
# Monitorea multiple contenedores:
# 1. Go to Stats tab
# 2. View all contenedores stats
# 3. Identify resource hogs
# 4. Take action (stop, limit, etc.)
# Track over time:
# Lazydocker shows current values
# For historical data, use docker stats --no-stream
Keybindings and Customization
Customize keybindings for efficient operation.
Default keybindings:
# Navigation:
# Tab - Switch panel
# Number (1-6) - Jump to specific panel
# Arrow keys - Navigate list items
# Page Up/Down - Scroll lists
# Operations:
# s - Inicia/Detén contenedor
# r - Reinicia contenedor
# d - Elimina/Remueve
# e - Ejecuta command in contenedor
# l - View logs
# i - Inspect details
# a - Attach/Detach
# Enter - Open detail view
# q - Quit current view
# / - Search/Filtra
# Docker operations:
# D - Docker menu (prune, etc.)
Customizing keybindings:
# Edit configuration file:
# ~/.config/lazydocker/config.yml
# Example custom keybindings:
cat > ~/.config/lazydocker/config.yml <<'EOF'
keybinding:
universal:
quit: 'q'
return: 'z'
contenedores:
startAll: 'S'
stopAll: 'T'
imágenes:
remove: 'D'
build: 'B'
EOF
# View current keybindings:
# Press '?' in Lazydocker for help
# Shows all available keybindings
Command mode (advanced):
# Press ':' to enter command mode
# Type Docker commands directly
# Examples:
# :docker ps -a
# :docker logs mycontainer
# :docker exec mycontainer bash
# Command mode output shown in overlay
# Useful for complex operations not in UI
# Escape to exit command mode
Configuración File
Configura Lazydocker behavior and appearance.
Configuración file structure:
# Edit ~/.config/lazydocker/config.yml
cat > ~/.config/lazydocker/config.yml <<'EOF'
# Lazydocker configuration
guiConfig:
theme:
activeBorderColor:
- green
- bold
inactiveBorderColor:
- white
windowBorderCorners: "rounded"
logs:
timestamps: true
follow: true
tail: 100
docker:
logLevel: 'info'
refreshUnfocusedPauseInterval: 10000
EOF
# Reinicia Lazydocker to apply changes
lazydocker
Environment configuration:
# Docker socket configuration:
# For non-standard socket location
export DOCKER_HOST=unix:///run/podman/podman.sock
lazydocker
# Proxy configuration:
export HTTP_PROXY=http://proxy.example.com:8080
export HTTPS_PROXY=http://proxy.example.com:8080
lazydocker
# Depura mode:
export DEBUG=true
lazydocker
Theme customization:
# Available themes:
# - default
- custom
# Color options:
# Colors: black, red, green, yellow, blue, magenta, cyan, white
# Styles: bold, underline, reverse
# Example: Custom theme
cat > ~/.config/lazydocker/config.yml <<'EOF'
guiConfig:
theme:
activeBorderColor:
- blue
- bold
inactiveBorderColor:
- gray
selectedLineBgColor:
- blue
optionsTextColor:
- yellow
windowBorderCorners: rounded
EOF
Conclusión
Lazydocker transforms Docker management from command-line-dependent workflows into intuitive visual interactions, significantly improving user experience for system administrators and DevOps engineers. The combination of contenedor management, log viewing, statistics monitoring, and customizable keybindings creates an efficient environment for daily Docker operations. Inicia with basic contenedor navigation and operations, progress to understanding statistics and performance metrics, and eventually customize keybindings and themes for your workflow. Whether managing a handful of development contenedores or monitoring production deployments, Lazydocker proporciona the visibility and control necessary for effective contenedor management. Integrate Lazydocker into your development and operations workflows to reduce complexity and improve productivity when working with Docker contenedores.


