whaletop
An htop-style terminal UI for Docker (unofficial; not affiliated with Docker, Inc.). It covers what Docker Desktop does (containers, compose stacks, images, volumes and networks) without leaving the terminal.
CPU[||||||||||| 13.6% of 8 cpu] Containers: 8 running, 3 exited Images: 602
Mem[||| 263M/7.6G] Disk: images 139G (90G reclaimable) · volumes 2.1G …
Hst ▁▁▂▂▁▃▅▇▅▃▂▁ Engine: 29.8.0 my-host
1 Containers 2 Images 3 Volumes 4 Networks
NAME IMAGE STATUS CPU% ▼ MEM% MEM / LIMIT NET ↓↑/s …
● busy-loop alpine Up 11 minutes 104.0 ▮▮▮▮▮▮ 0.0 ···· 372K / 7.6G ↓0B ↑0B
● api-1 api:dev Up 25 minutes (h…) 0.2 ······ 0.4 ···· 31.9M / 7.6G ↓262B ↑131B
Install
Debian / Ubuntu (Ubuntu 22.04+, Debian 12+):
curl -fsSL https://open-package.github.io/whaletop/whaletop.gpg | sudo tee /usr/share/keyrings/whaletop.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/whaletop.gpg] https://open-package.github.io/whaletop stable main" \
| sudo tee /etc/apt/sources.list.d/whaletop.list
sudo apt update && sudo apt install whaletop
Any OS with Python 3.10+ (other Linux distros, macOS), from PyPI:
pipx install whaletop # or: uv tool install whaletop
From source:
pipx install . # or: python -m venv .venv && .venv/bin/pip install -e .
Run it:
whaletop # or: python -m whaletop
whaletop -H ssh://me@server # any DOCKER_HOST-style address
whaletop requires Python 3.10+ and access to the Docker socket. It also needs the docker CLI for exec, attach and compose. It connects to --host, then $DOCKER_HOST, then the docker CLI's current context, so Docker Desktop's desktop-linux socket works without extra setup.
What you can do
| Tab | Shows | Keys |
|---|---|---|
| 1 Containers | Compose projects as expandable ◆ groups (with summed CPU and memory), their containers nested below, and standalone containers as plain rows. Live CPU%, MEM%, mem/limit, net and disk I/O rates, PIDs, ports | enter expand/collapse · s start/stop · r restart · l logs · d remove (on a project row these act on the whole stack, and d runs compose down) · p pause · k/F9 kill · e shell · a attach · i inspect · u compose up · D down · P pull · h hide stopped · X clean up stopped containers |
| 2 Images | repo, tag, size, age, containers using each image | P pull · R run · d remove · X clean up: dangling images, all unused images, build cache |
| 3 Volumes | driver, which containers use it, size | d remove · X clean up: unused anonymous / all unused volumes |
| 4 Networks | driver, subnet, attached containers | d remove · X clean up unused networks |
The following keys work on every list:
/(orF3/F4) filters.>/F6and<cycle the sort column. Clicking a column header also sorts.Iinverts the sort order.1–4,[and]switch tabs.F5refreshes.?/F1opens help.q/F10quits.
In the logs viewer, / filters lines, f toggles follow, t toggles timestamps, g/G jump to the top/bottom, and esc goes back.
Destructive actions always ask for confirmation. X opens a clean-up dialog that lists exactly what each option would remove and how much space it frees before anything is deleted. Exec and attach suspend the TUI, hand your terminal to docker exec -it or docker attach, and bring whaletop back when you exit.
How it works
- Live stats: one streaming
/containers/{id}/statsconnection per running container, each on its own background thread (stats.py). CPU% uses the same formula asdocker stats. Memory excludes the page cache. - Updates: a
/eventssubscription (events.py) marks the affected tabs as stale, and they reload within 300 ms. A 5-second poll on the container list catches anything the event stream missed. - No UI blocking: every Docker API call runs on a daemon thread, so slow calls never freeze the UI or delay quitting.
/system/dfcan take 30s or more on hosts with hundreds of images. That's why the Disk line can show calculating… for a while after start; it refreshes every 2 minutes. - Compose: projects come from
com.docker.compose.*labels. Project actions rundocker compose -p <project> --project-directory <dir> -f <files> …. If the compose files no longer exist, stop, restart and remove still work by acting on the containers directly.
Development
.venv/bin/pip install -e '.[dev]'
.venv/bin/pytest # unit + Textual pilot tests against a fake Docker service
Releasing and packaging: see packaging/README.md.
Layout: src/whaletop/app.py (app shell), views/ (one class per tab), widgets/resource_table.py (sortable/filterable table base), widgets/meters.py (header), screens/ (logs, inspect, dialogs, help), docker_client.py (the only module that talks to Docker).
License
Apache License 2.0. See LICENSE.
whaletop is an independent project. Docker is a trademark of Docker, Inc., and whaletop is not affiliated with or endorsed by Docker, Inc.
Metadata
Release files for whaletop 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| whaletop-0.1.0.tar.gz | 44.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| whaletop-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 88.8 kB
Release files / whaletop-0.1.0.tar.gz
| Download URL | whaletop-0.1.0.tar.gz |
|---|---|
| Size | 44.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb59ab3b6b6d7659371c2ed20e15fdb1dec88ee461541ddd1e47a086d508b02c
|
|
BLAKE2b-256 checksum How to use checksums |
29929079b2d396e4c39f262778ae7bd3b1cd5564c948808b71fda12fd6cda85c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.
Transparency logRelease files / whaletop-0.1.0-py3-none-any.whl
| Download URL | whaletop-0.1.0-py3-none-any.whl |
|---|---|
| Size | 44.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e7203ffb3fbb99ff63a14425870450a8f71d79858b19362125d296582cd7758
|
|
BLAKE2b-256 checksum How to use checksums |
44441cba601b0745470f8dc9742a62b0171e32438554661f59307ac05e037a78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.
Transparency log