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 panelContainers
[: 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 panelServices
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 panelImages
[: previous tab
]: next tab
d: remove image
D: prune unused images
enter: focus main panelVolumes
[: previous tab
]: next tab
d: remove volume
D: prune unused volumes
enter: focus main panelMain
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.
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.
