$ dok
Docker output, made readable.
Synopsis
dok [OPTIONS] <COMMAND>Description
dok reads the Docker daemon’s API directly and renders containers, images, logs, disk usage and events for a person to read. Every command prints one static screen and exits, except stats, so output pipes into grep, less and jq like any other Unix tool.
dok is read-only. It never starts, stops, execs into or removes anything, which makes it safe to point at a production socket. dok(7) lists every Docker API call it makes.
Commands
Containers
dok psList containers, grouped by compose projectdok portsEvery published port in one table, sorted by portdok healthContainers with a healthcheck: status, failing streak, last probedok inspectReadable summary of a container's configuration and statedok logsTail logs from one or more containers with level colouringdok topProcesses running inside containers, as a treeImages
dok imagesList images with size and age gradientsdok historyLayers of an image with size bars and readable instructionsDisk
dok dfDisk usage by images, containers, volumes and build cachedok pruneWhat docker system prune would remove. Never removes anythingSystem
dok treeTree view of compose projects, networks and volumesdok eventsLive daemon event stream, colour-codeddok statsLive CPU / memory / IO dashboardSetup
dok themesList or preview themesdok completionsPrint a shell completion script to stdoutdok updateCheck for a newer dok and install itdok uninstallRemove dok, or print the command that doesGlobal options
--color <COLOR>- When to colourise output
--icons <ICONS>- Which icon set to use
--theme <THEME>- Theme name (see
dok themes); overrides DOK_THEME and the config file --json- Emit JSON instead of a table. Implies --color never
Colour and icons turn off by themselves when output is not a terminal, and NO_COLOR is honoured.
JSON output
--json works on every command that has something to show. It carries dok’s data rather than the raw API: the compose project, the service name, the health verdict, the reclaimable flag. Run docker inspect for the raw payload.
Sizes and ages arrive as both the number and the rendering, so nothing has to be parsed back:
{
"size": {
"bytes": 1181116006,
"human": "1.1GB"
}
}An absent value is null, never an empty string. logs and events are streams and emit NDJSON, one object per line. --json implies --color never and suppresses the update notice, since anything after the document would break a parser.
Configuration
dok themes --init writes ~/.config/dok/config.toml:
theme = "mine"
icons = "nerd" # auto | nerd | unicode | none
[themes.mine]
base = "gruvbox" # start from any built-in
glyphs = "heavy" # unicode | ascii | heavy | slim
layout = "grid" # default | ruled | grid | quiet | ascii
green = "#00ff00" # override any palette roleTheme precedence is --theme, then DOK_THEME, then the config file, then default.
Environment
DOCKER_HOST- Where the daemon is. Unset means
/var/run/docker.sock, or the named pipe on Windows. DOK_THEME- Theme name, below
--themeand above the config file. NO_COLOR- Any value turns colour off, as
--color neverdoes. DOK_NERD_FONT1forces Nerd Font glyphs,0refuses them.DOK_NO_UPDATE_CHECK- Any value stops the once-a-day release check.
DOK_DEMO- Same as
--demo: render the built-in example stack, no daemon needed.
See also
dok(7), github.com/alsaadii98/dok