Lazydocker is a terminal-based UI for Docker that provides a visual dashboard for managing containers, images, volumes, and networks without remembering complex CLI commands. It shows real-time logs, stats, and allows interactive container management — all within your terminal. This guide covers installation and productive usage.
Installation
# Binary installation
curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash
# Go install
go install github.com/jesseduffield/lazydocker@latest
# Homebrew
brew install lazydocker
# Docker (no installation)
docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock lazyteam/lazydocker
Usage
# Simply run
lazydocker
# The interface shows:
# Left panels: Containers, Images, Volumes
# Right panels: Logs, Stats, Config for selected item
# Bottom: Key bindings and status
Key Bindings
- [ / ] — switch between panels (containers, images, volumes)
- Enter — focus on selected item
- d — remove container/image/volume
- s — stop container
- r — restart container
- a — attach to container (interactive shell)
- m — view container metrics (CPU, memory, network)
- l — view logs
- c — run custom command
- b — bulk actions
- x — open menu for selected item
- ? — help
- q — quit
Features
- Real-time logs — stream container logs with search and filtering
- Live stats — CPU, memory, network I/O for each container
- Container management — start, stop, restart, remove, attach
- Image management — view layers, remove unused images
- Volume management — inspect and remove volumes
- Docker Compose — manages Compose services if docker-compose.yml is in the current directory
- Custom commands — define frequently used commands in config
Configuration
# ~/.config/lazydocker/config.yml
gui:
theme:
activeBorderColor:
- green
- bold
returnImmediately: false
wrapMainPanel: true
commandTemplates:
dockerCompose: docker compose
customCommands:
containers:
- name: bash
attach: true
command: docker exec -it {{ .Container.ID }} /bin/bash
- name: view env
command: docker exec {{ .Container.ID }} env
Docker Compose Integration
# Navigate to a directory with docker-compose.yml
cd /path/to/project
lazydocker
# Lazydocker detects Compose and shows service-level management
Best Practices
- Add
alias lzd=lazydockerto your shell profile for quick access - Use it for daily container monitoring and management on development machines
- Define custom commands for frequently used debug operations
- Use the Docker socket mount approach for server-side usage without installing on the host
- Combine with Docker contexts for managing remote servers interactively