# Lazydocker — The Lazier Way to Manage Everything Docker > Lazydocker is a simple terminal UI for managing Docker and Docker Compose. See containers, images, volumes, logs, and stats in a single dashboard. Stop, restart, remove, prune, view logs — all without memorizing docker commands. ## Install Save as a script file and run: ## Quick Use ```bash # Install brew install lazydocker # macOS go install github.com/jesseduffield/lazydocker@latest curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash # Launch lazydocker ``` Keybindings: - `1..5` — switch panels (containers, images, volumes, networks, etc.) - `space` — start/stop container - `d` — remove (with prompts) - `r` — restart - `l` — view logs - `s` — view stats (CPU, memory) - `E` — exec into container shell - `?` — help menu ## Intro Lazydocker is a simple terminal UI for managing Docker and Docker Compose, created by Jesse Duffield (same author as Lazygit). Instead of memorizing `docker ps`, `docker logs`, `docker stats`, and dozens of flags, everything you need sits in a single TUI dashboard. Written in Go with gocui. - **Repo**: https://github.com/jesseduffield/lazydocker - **Stars**: 50K+ - **Language**: Go - **License**: MIT ## What Lazydocker Does - **Containers panel** — status, CPU, memory, ports at a glance - **Logs** — live tail any container - **Stats** — real-time CPU/memory/network graphs - **Exec** — jump into container shell - **Images** — list, prune, remove - **Volumes** — inspect, prune - **Networks** — list, inspect - **Compose** — services, restart, rebuild - **Custom commands** — shortcut your own docker commands ## Architecture Go binary with gocui TUI. Wraps the Docker CLI under the hood. Auto-discovers the current project docker-compose.yml and surfaces its services. State is refreshed on interval. ## Self-Hosting CLI tool — install locally. ## Key Features - Single-binary TUI - Live container stats - Inline log viewer - Shell exec shortcut - Compose-aware - Volume and image management - Bulk prune operations - Custom command bindings - Dark and light themes ## Comparison | Tool | Type | Scope | Compose-aware | |---|---|---|---| | Lazydocker | TUI | Full docker + compose | Yes | | ctop | TUI | Containers stats only | No | | docker-compose-ui | Web | Compose management | Yes | | Portainer | Web GUI | Full docker + swarm | Yes | | docker CLI | CLI | Full docker | Yes | ## 常见问题 FAQ **Q: 和 Portainer 比?** A: Portainer 是 web GUI,适合团队协作 + 远程管理;Lazydocker 是本地 TUI,适合开发者工作流,启动 0 配置。 **Q: 能远程连 Docker 吗?** A: 能。设 `DOCKER_HOST=tcp://remote:2375` 或通过 docker context 切换。Lazydocker 会连到当前 context。 **Q: 性能开销?** A: 几 MB 内存。定时 poll Docker API,间隔可配。比原生 docker CLI 稍慢但可忽略。 ## 来源与致谢 Sources - GitHub: https://github.com/jesseduffield/lazydocker - License: MIT --- Source: https://tokrepo.com/en/workflows/d3b63baa-35cb-11f1-9bc6-00163e2b0d79 Author: Script Depot