Docker contexts
Updated 28 November 2026
dp talks to the same daemon as docker. If docker ps shows your containers, dp does too, whether they run in Docker Desktop, colima, another local runtime or on a server.
Which daemon dp uses
DOCKER_HOST, when it is set.- Otherwise
DOCKER_CONTEXT, when it is set. - Otherwise the current context you chose with
docker context use. - The context named
defaultuses the platform's default socket.
If the selected context doesn't exist or is invalid, dp stops with an error instead of quietly connecting somewhere else.
Local runtimes such as Docker Desktop and colima add their own context, so once docker context ls lists it and docker works, dp works too. Run docker context ls to see what you have; the current one has a *.
Switch inside dp
Press c on any list tab, or open settings with o and choose Docker context. Type / to filter by name or endpoint and enter to switch.
- The choice lasts for this dp session. It overrides
DOCKER_HOSTandDOCKER_CONTEXTand does not change the Docker CLI's saved current context. - dp keeps the tab you are on. Filters, selections, stats history and the event timeline start fresh, because they belong to the old daemon.
- If the new context can't be opened, dp goes back to the previous one and shows the error.
- Finish pending actions and close details or logs before switching.
One-off commands against another context
Docker's global flags pass straight through, so this works without switching anything:
$ dp --context prod ps
For a single run of the TUI, set the variable instead:
$ DOCKER_CONTEXT=prod dp
Connection status
Under the tabs, dp shows which context or endpoint it is bound to and whether it is connected. It checks the daemon every two seconds; when the daemon comes back after an outage, lists and open details refresh without losing your filters or selection. ctrl+r refreshes and checks right away. Changing the Docker CLI's current context in another terminal doesn't move a running dp.
Full reference: Daemon connection.