Administering Docker containers, images, volumes, and networks on Linux servers typically requires juggling repetitive command-line invocations like docker ps, docker logs -f, docker exec -it, and docker system prune. While web-based container management platforms exist, they introduce unnecessary overhead, external port exposures, and security surface area on production servers. lazydocker is a terminal user interface (TUI) written in Go that provides a complete, keyboard-driven dashboard to inspect and manage Docker environments with zero web overhead.
Core Advantages of Lazydocker
Developed with developer ergonomics in mind, lazydocker streamlines container maintenance directly in your shell:
- Live Multi-Container Monitoring: Displays real-time CPU and memory graphs for individual running containers alongside aggregated container lists.
- Interactive Log Streaming: Automatically attaches and tails container stdout/stderr logs with full text search and colour formatting.
- Single-Key Actions: Start, stop, restart, pause, or remove containers, images, and volumes using single keyboard presses.
- In-Terminal Container Shell: Press a single key to attach directly to an interactive bash/sh shell inside any running container without remembering container IDs.
- Volume and Image Pruning: Visualises dangling images and unused persistent volumes, allowing you to reclaim gigabytes of disk space with an interactive confirmation prompt.
Installing Lazydocker on Linux
You can install lazydocker through several convenient methods:
- Automated Installation Script:
This script downloads the correct pre-compiled binary for your CPU architecture (x86_64 or ARM64) and places it intocurl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update.sh | bash~/.local/bin/lazydocker. - Arch Linux and Manjaro:
sudo pacman -S lazydocker - Homebrew on Linux:
brew install lazydocker - Run via Docker Itself: If you prefer not to install local binaries, run
lazydockerdirectly inside a temporary container bound to the local Docker socket:docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v ~/.config/lazydocker:/.config/jesseduffield/lazydocker lazyteam/lazydocker
Launching and Navigating the Lazydocker Dashboard
To start the application, open your terminal and run:
lazydocker
The interface divides into distinct panels on the left-hand column and a large dynamic inspection viewport on the right:
- Project Panel: Summarises Docker daemon status, total containers, images, and cumulative CPU/memory consumption.
- Containers: Lists running, stopped, and restarting containers.
- Services: If a
docker-compose.ymlfile is present in your working directory, manages multi-container compose services together. - Images: Displays local Docker images, tags, and disk footprints.
- Volumes: Lists all persistent storage volumes.
Use the [ and ] bracket keys or numbers 1 through 5 to cycle between panels, and use arrow keys (or Vim-keys j/k) to move up and down.
Essential Keyboard Shortcuts for Container Management
Handling day-to-day Docker operations inside lazydocker takes only seconds:
- Inspect Logs: Highlight a container and press
Enterto focus the real-time log stream. Press/to search within logs. - Stop / Restart: Press
sto stop an active container; pressrto trigger an immediate restart. - Attach to Shell: Press
eto open an interactive bash/sh shell inside the selected container immediately. - Remove Container: Press
dto delete a container. - Prune Unused Data: In the Project panel, press
mto open the maintenance menu and select Prune containers or Prune volumes to reclaim disk space. - Quit: Press
qto exit the interface cleanly.