百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

dry

> DevOps
开源

dry - 用于终端的 Docker 管理器 @

3.3K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

dry - 用于终端的 Docker 管理器 @

dry

Dry is a terminal application for Docker and Docker Compose.

It lets you browse containers, images, networks, and volumes, and manage Compose projects — bring them up, take them down, see what has drifted from the compose file — without leaving the terminal. It can be used with both local or remote Docker daemons.

Besides showing information, it can be used to manage Docker. Most of the commands that the official Docker CLI provides, are available in dry with the same behaviour. A list of available commands and their keybindings can be found in dry's help screen or in this README.

It can also be used as a monitoring tool for Docker containers, and, when the daemon is running a Swarm cluster, to manage Nodes, Services, and Stacks — see Docker Swarm below.

Dry is installed as a single binary and does not require external libraries.

The demo below shows a dry session.

dry keybinds

Global

Keybinding Description
% filter list
F1 sort list
F5 refresh list
F7 toggle showing Docker daemon information
F8 show docker disk usage
F9 show last 10 docker events
F10 show docker info
1 show container list
2 show image list
3 show network list
4 show volumes list
5 show node list (on Swarm mode)
6 show service list (on Swarm mode)
7 show stacks list (on Swarm mode)
8 show compose projects list
ArrowUp or k move the cursor one line up
ArrowDown or j move the cursor one line down
g move the cursor to the top
G move the cursor to the bottom
: open command palette
Space open Quick Peek for the current selection
Ctrl+0 cycle color theme (dark/light)
q quit dry

Workspace mode (--workspace)

dry --workspace enables the Phase 1 workspace shell. This keeps the current list view visible together with a passive context pane and a bottom activity pane.

  • Tab and Shift+Tab switch focus between Navigator, Context, and Activity in the full workspace layout.
  • When Context is focused, you can scroll it with the usual navigation keys.
  • p / P pins or unpins the current preview.
  • : opens the command palette with global and context-aware actions.
  • Space opens Quick Peek, a temporary side panel with recent logs or inspect/details for the current selection.
  • f toggles follow mode in the activity pane.
  • Existing primary actions stay on their original keys. For example, Enter still opens the container command menu and still inspects resources in views where Enter already meant inspect/drill-down.
  • Embedded activity logs start from a recent tail instead of replaying the full log history.
  • On narrow or short terminals, workspace mode falls back to a compact single-pane layout and lets Tab switch between navigator and activity.

Container commands

Keybinding Description
Enter show container command menu (includes Attach for running containers)
F2 toggle on/off showing stopped containers
i inspect
l container logs
e remove
s stats
x exec a command in the selected container (default /bin/sh)
Ctrl+e remove all stopped containers
Ctrl+k kill
Ctrl+r start/restart
Ctrl+t stop

Image commands

Keybinding Description
i history
Ctrl+d remove dangling images
Ctrl+e remove image
Ctrl+f remove image (force)
Ctrl+u remove unused images
Enter inspect

Network commands

Keybinding Description
Ctrl+e remove network
Enter inspect

Volume commands

Keybinding Description
Ctrl+a remove all volumes
Ctrl+e remove volume
Ctrl+f remove volume (force)
Ctrl+u remove unused volumes
Enter inspect

Service commands

Keybinding Description
i inspect service
l service logs
Ctrl+r remove service
Ctrl+s scale service
Ctrl+u update service
Enter show service tasks

Compose Projects commands

Keybinding Description
Enter show project services
u bring the selected service up, with no prompt; on a project's own row it asks first
d take the project down, from its own row and behind a prompt: compose down removes the project's networks too, so there is no per-service form
c show the project's rendered compose configuration
l logs for the selected service, or the project on its header
Ctrl+t stop the selected service, or the project on its header
Ctrl+r restart the selected service, or the project on its header
Ctrl+e remove the selected service's containers, or the project's

Ctrl+t, Ctrl+r, Ctrl+e and d all name their target in a confirmation prompt, "Stop service webapp/api?" or "Take project webapp down?", so a cursor that has moved is visible before anything runs. u on a service row is the one action that runs unasked, since it creates rather than destroys; on a drift row it does recreate the containers, which is the point of the label.

Compose Services commands

Keybinding Description
Enter inspect service
Esc back to projects
u bring the selected service up
c show the project's rendered compose configuration
l service logs
Ctrl+s start service containers
Ctrl+t stop service containers
Ctrl+r restart service containers
Ctrl+e remove service containers

Moving around buffers

Keybinding Description
ArrowUp or k move the cursor one line up
ArrowDown or j move the cursor one line down
g move the cursor to the beginning of the buffer
G move the cursor to the end of the buffer
n after search, move forwards to the next search hit
N after search, move backwards to the previous search hit
s search
pg up move the cursor "screen size" lines up
pg down move the cursor "screen size" lines down

Installation

The easiest way to install the latest binaries for Linux and Mac is to run this in a shell:

curl -sSf https://moncho.github.io/dry/dryup.sh | sudo sh
sudo chmod 755 /usr/local/bin/dry

Binaries

If you dont like to curl | sh, binaries are provided.

  • darwin amd64 / arm64
  • freebsd 386 / amd64
  • linux 386 / amd64 / arm64 / armv6 / armv7
  • windows amd64

Mac OS X / Homebrew

If you're on OS X and want to use homebrew:

brew tap moncho/dry
brew install dry

Docker

docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -e DOCKER_HOST=$DOCKER_HOST moncho/dry

Arch Linux

yay -S dry-bin

Usage

Open a console, type dry. It will try to connect to:

  • A Docker host given as a parameter (-H).
  • if none given, a Docker host defined in the $DOCKER_HOST environment variable.
  • if not defined, to unix:///var/run/docker.sock.

dry does not read docker context, so with Docker Desktop, colima or Rancher Desktop, whose active context is not that socket, name the host with -H or $DOCKER_HOST. The same value is what dry hands the docker compose plugin, so the two always agree about which daemon they are talking to.

If no connection with a Docker host succeeds, dry will exit.

Connecting over SSH

dry can talk to a remote Docker daemon through SSH, the same way the docker CLI does:

DOCKER_HOST=ssh://user@host dry

Host, port, and user are resolved like the ssh command resolves them: Hostname, Port, User, and IdentityFile directives from ~/.ssh/config are honored, the port defaults to 22, the user defaults to the current OS user, and the remote Docker socket defaults to /var/run/docker.sock (a different socket path can be given in the URL, e.g. ssh://user@host:2222/run/user/1000/docker.sock).

Authentication tries, in order: the identity files configured for the host in ~/.ssh/config (or, when none is configured, the ~/.ssh/id_* keys), keys held by a running SSH agent (SSH_AUTH_SOCK), and a password given in the URL. Passphrase protected key files are used through the agent.

The remote host key is verified against ~/.ssh/known_hosts and /etc/ssh/ssh_known_hosts, and the connection fails if the host is unknown or its key does not match. Connect once with ssh host to record the key. Verification can be disabled with DRY_SSH_INSECURE_SKIP_HOST_KEY_CHECK=1, which leaves the connection open to interception and should only be used against hosts you fully control.

dry -T light launches dry with the light color theme. Available themes: dark (default), light.

dry --workspace launches the experimental Phase 1 workspace layout.

dry -p launches dry with pprof package active.

Docker Compose

Compose projects show up in their own view (key 8), each project row followed by its services indented under it; pressing Enter on a project opens its services, networks and volumes in the Compose Services view.

Keybinding Description
u bring the selected service up, with no prompt; on a project's own row it asks first
d take the project down, from its own row and behind a confirmation prompt
c show the project's rendered compose configuration

u and c work in both the Compose Projects and Compose Services views; d works in Compose Projects only.

Projects are d

Issues· 27 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Godockerdocker-clidocker-enginedocker-swarm

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理