How jesseduffield/lazydocker works
Lazydocker is a terminal UI for managing Docker and Docker Compose. The main workflow starts with the user launching the app, which initializes configuration, Docker access, and the UI; users then inspect and operate containers, services, projects, images, networks, and volumes. The UI uses command adapters for Docker and host commands, while task management supports background and repeating work. Some resource panels are represented from the tree and README rather than inspected source, so their internal links are omitted where call ownership is not evidenced.
Main entry points: app.go App bootstrap · docker.go Docker commands · services_panel.go Services panel · gui.go GUI runtime
Components 19
Startup
- CLI entry
main.go - App bootstrap
pkg/app/app.go - App config
pkg/config/app_config.go
Terminal UI
- GUI runtime
pkg/gui/gui.go - Containers panel
pkg/gui/containers_panel.go - Services panel
pkg/gui/services_panel.go - Other resource panels
pkg/gui - Resource presentation
pkg/gui/presentation - GUI task adapter
pkg/gui/tasks_adapter.go
Docker access
- Docker commands
pkg/commands/docker.go - Host commands
pkg/commands/os.go - Service actions
pkg/commands/service.go - SSH tunnel
pkg/commands/ssh/ssh.go
Runtime support
- Task manager
pkg/tasks/tasks.go - Translations
pkg/i18n/i18n.go - Logging
pkg/log/log.go
Other components
- User
- Docker daemon
- Compose CLI
Connections 23
- User → CLI entry: launches
- CLI entry → App config: loads
main.go - CLI entry → App bootstrap: starts
main.go - App bootstrap → App config: uses
pkg/app/app.go - App bootstrap → GUI runtime: creates
pkg/app/app.go - App bootstrap → Docker commands: creates
pkg/app/app.go - App bootstrap → Host commands: creates
pkg/app/app.go - App bootstrap → Translations: loads
pkg/app/app.go - App bootstrap → Logging: creates
pkg/app/app.go - GUI runtime → Containers panel: renders
- GUI runtime → Services panel: renders
- GUI runtime → Other resource panels: renders
- Containers panel → Docker commands: uses
pkg/gui/containers_panel.go - Containers panel → Resource presentation: uses
pkg/gui/containers_panel.go - Services panel → Docker commands: uses
pkg/gui/services_panel.go - Services panel → Resource presentation: uses
pkg/gui/services_panel.go - Services panel → GUI task adapter: uses
pkg/gui/services_panel.go - Services panel → Host commands: runs
pkg/gui/services_panel.go - GUI task adapter → Task manager: queues
pkg/gui/tasks_adapter.go - Docker commands → Docker daemon: queries
pkg/commands/docker.go - Docker commands → Compose CLI: queries
pkg/commands/docker.go - Docker commands → SSH tunnel: configures
pkg/commands/docker.go - Service actions → Host commands: runs
pkg/commands/service.go