Managing containerised environments with the Docker CLI is an everyday task for software developers and DevOps engineers. However, repeatedly executing verbose commands like docker ps -a, docker logs -f --tail=100 <container_id>, docker stats, and docker-compose down introduces noticeable friction when triaging running microservices. While web-based container dashboards (such as Portainer) exist, they require separate container deployments, network port exposure, and browser context-switching. To maintain peak terminal productivity, engineers turn to lazydocker. Written in Go, lazydocker provides an interactive, terminal-based user interface (TUI) that puts complete Docker and Docker Compose orchestration right at your fingertips.
Why lazydocker Streamlines Container Workflows
Unlike plain text CLI commands, lazydocker provides a responsive mouse- and keyboard-driven dashboard:
- Instant Log Streaming: View real-time aggregated container stdout and stderr streams with auto-scroll and pause toggles.
- Interactive Resource Monitoring: Inspect real-time ASCII graph visualisations of CPU and RAM utilisation per container without running external monitoring agents.
- One-Key Lifecycle Actions: Start, stop, restart, pause, or remove containers and images with single keystroke shortcuts.
- Volume and Image Pruning: Audit unused image layers and dangling volumes, reclaiming gigabytes of disk space with intuitive confirmation prompts.
- Docker Compose Native: Automatically detects project-level compose stacks, grouping related services and containers into visual trees.
Installing lazydocker on Linux
lazydocker is distributed as a lightweight, standalone compiled binary that requires no external runtimes beyond an active Docker daemon.
Method 1: Automated Official Shell Script
The fastest universal method to install the latest pre-built binary into ~/.local/bin or /usr/local/bin:
curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update.sh | bash
Method 2: Package Managers (Arch, Homebrew, and Go)
On Arch Linux and Manjaro:
sudo pacman -S lazydocker
If you have the Go toolchain installed:
go install github.com/jesseduffield/lazydocker@latest
Using Linuxbrew:
brew install jesseduffield/lazydocker/lazydocker
Ensuring Docker Permissions Without Sudo
To operate lazydocker as a standard user without prepending sudo, verify that your Linux user belongs to the docker system group:
sudo usermod -aG docker $USER
newgrp docker
Confirm lazydocker can access the Docker socket:
lazydocker --version
Navigating the lazydocker User Interface
Launch the dashboard by navigating to any project directory containing containers or a docker-compose.yml file and running:
lazydocker
The interface divides cleanly into logical panels:
- Left Sidebar: Categorised navigation lists for Project, Containers, Services, Images, and Volumes.
- Right Main Panel: Displays contextual tabs for the currently selected item, including Logs, Stats, Env, Config, and Top.
Key Navigation Shortcuts
- [ and ]: Switch between sidebar categories (Containers, Images, Volumes).
- j and k (or Up / Down): Navigate through items in the active panel.
- Enter: Focus on the main panel to inspect full logs or scroll through historical stack traces.
- Esc: Return focus to the sidebar.
- q: Exit lazydocker cleanly.
Performing Everyday Container Tasks
lazydocker maps critical lifecycle commands to single keys:
1. Stopping, Restarting, and Removing Containers
Highlight any container in the list:
- Press s to stop a running container.
- Press r to trigger an immediate restart.
- Press d to remove the container (with an optional confirmation prompt).
- Press b to view bulk container actions (such as restarting or stopping all active containers simultaneously).
2. Filtering and Searching Logs
When triaging an application crash, press / while in the Logs panel to initiate a regex search. lazydocker highlights matching log statements and jumps directly to error coordinates.
3. Pruning Unused Images and Dangling Volumes
Navigate to the Images panel using ]. Press d on any untagged image to delete it. To perform a comprehensive system clean, press m (Menu) and select Prune unused images and containers to reclaim disk space instantly.