Discover LazyDocker: A Terminal UI for Effortless Docker Management
This guide presents LazyDocker, a Go‑based terminal UI tool that simplifies Docker and Docker‑Compose container and service management with clear status views, log access, customizable ASCII metrics, and convenient keyboard shortcuts, plus multiple installation options.
This article introduces LazyDocker, a simple terminal‑based UI tool written in Go for managing Docker and Docker‑Compose containers and services.
1. Features
View Docker or Docker‑Compose container environment status at a glance.
Inspect logs of containers/services.
Display ASCII charts of container metrics such as CPU and memory.
Customize these charts to measure almost any metric you desire.
Directly enter a container or service.
Restart, delete, or rebuild containers/services.
View ancestor layers of a given image.
Prune containers, images, or volumes that consume disk space.
2. Installation
Installation is straightforward via Homebrew, binary releases, or Go.
# Homebrew
brew tap jesseduffield/lazydocker
brew install lazydocker # Binary Release (Linux/OSX)
curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash # Go (requires Go >= 1.8)
go get github.com/jesseduffield/lazydocker # Zsh configuration
echo "alias lzd='lazydocker'" >> ~/.zshrc # Dockerfile example
# docker build -t lazydocker .
# docker run -it lazydocker:latest /bin/sh -l
FROM golang:alpine
WORKDIR /go/src/github.com/jesseduffield/lazydocker/
COPY ./ .
RUN CGO_ENABLED=0 GOOS=linux go build
FROM alpine:latest
RUN apk add -U git xdg-utils
WORKDIR /go/src/github.com/jesseduffield/lazydocker/
COPY --from=0 /go/src/github.com/jesseduffield/lazydocker /go/src/github.com/jesseduffield/lazydocker
COPY --from=0 /go/src/github.com/jesseduffield/lazydocker/lazydocker /bin/
echo "alias gg=lazydocker" >> ~/.profile3. Keyboard Bindings
Key shortcuts improve usability across different panels.
Project
e: edit lazydocker config
o: open lazydocker config
[: previous tab
]: next tab
m: view logs
enter: focus main panel Containers
[: previous tab
]: next tab
d: remove
e: Hide/Show stopped containers
s: stop
r: restart
a: attach
D: prune exited containers
m: view logs
c: run predefined custom command
enter: focus main panel Services
d: remove containers
s: stop
r: restart
a: attach
m: view logs
[: previous tab
]: next tab
R: view restart options
c: run predefined custom command
enter: focus main panel Images
[: previous tab
]: next tab
d: remove image
D: prune unused images
enter: focus main panel Volumes
[: previous tab
]: next tab
d: remove volume
D: prune unused volumes
enter: focus main panel Main
esc: returnSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
