Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/moncho/dry

dry - A Docker manager for the terminal @
https://github.com/moncho/dry

docker docker-cli docker-engine docker-swarm golang

Last synced: about 2 months ago
JSON representation

dry - A Docker manager for the terminal @

Lists

README

        

# dry

[![MIT License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/moncho/dryblob/master/LICENSE)
![Build Status](https://github.com/moncho/dry/actions/workflows/go.yml/badge.svg)
![Docker Build](https://github.com/moncho/dry/actions/workflows/docker.yml/badge.svg)
[![Go Report Card](https://goreportcard.com/badge/github.com/moncho/dry)](https://goreportcard.com/report/github.com/moncho/dry)
[![GoDoc](https://godoc.org/github.com/moncho/dry?status.svg)](https://godoc.org/github.com/moncho/dry)
[![Github All Releases](https://img.shields.io/github/downloads/moncho/dry/total.svg)]()
[![Release](https://img.shields.io/github/release/moncho/dry.svg?style=flat-square)](https://github.com/moncho/dry/releases/latest)
[![dry](https://snapcraft.io/dry/badge.svg)](https://snapcraft.io/dry)

**Dry** is a terminal application to manage **Docker** and **Docker Swarm**.

It shows information about Containers, Images and Networks, and, if running a **Swarm** cluster, it shows information about Nodes, Service, Stacks and the rest of **Swarm** constructs. 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.

Lastly, it can also be used as a monitoring tool for **Docker** containers.

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

The demo below shows a **dry** session.

[![asciicast](https://asciinema.org/a/35825.png)](https://asciinema.org/a/35825?autoplay=1&speed=1.5)

## **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)
ArrowUp | move the cursor one line up
ArrowDown | move the cursor one line down
g | move the cursor to the top
G | move the cursor to the bottom
q | quit dry

#### Container commands

Keybinding | Description
---------------------|---------------------------------------
Enter | show container command menu
F2 | toggle on/off showing stopped containers
i | inspect
l | container logs
e | remove
s | stats
Ctrl+e | remove all stopped containers
Ctrl+k | kill
Ctrl+l | container logs with Docker timestamps
Ctrl+r | start/restart
Ctrl+t | stop

#### Image commands

Keybinding | Description
---------------------|---------------------------------------
i | history
r | run command in new container
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+l | service logs with Docker timestamps
Ctrl+r | remove service
Ctrl+s | scale service
Ctrl+u | update service
Enter | show service tasks

#### Moving around buffers

Keybinding | Description
---------------------|---------------------------------------
ArrowUp | move the cursor one line up
ArrowDown | 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:

```sh
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** [386](https://github.com/moncho/dry/releases/download/v0.11.2/dry-darwin-386) / [amd64](https://github.com/moncho/dry/releases/download/v0.11.2/dry-darwin-amd64) / [arm64](https://github.com/moncho/dry/releases/download/v0.11.2/dry-darwin-arm64)
* **freebsd** [386](https://github.com/moncho/dry/releases/download/v0.11.2/dry-freebsd-386) / [amd64](https://github.com/moncho/dry/releases/download/v0.11.2/dry-freebsd-amd64)
* **linux** [386](https://github.com/moncho/dry/releases/download/v0.11.2/dry-linux-386) / [amd64](https://github.com/moncho/dry/releases/download/v0.11.2/dry-linux-amd64)
* **windows** [386](https://github.com/moncho/dry/releases/download/v0.11.2/dry-windows-386) / [amd64](https://github.com/moncho/dry/releases/download/v0.11.2/dry-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

```yaourt -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**.

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

```dry -p``` launches dry with [pprof](https://golang.org/pkg/net/http/pprof/) package active.

### Contributing

All contributions are welcome.

* Fork the project.
* Make changes on a topic branch.
* Pull request.

## Copyright and license

Code released under the MIT license. See
[LICENSE](https://github.com/moncho/dry/blob/master/LICENSE) for the full license text.

## Credits

Built on top of:

* [tcell](https://github.com/gdamore/tcell)
* [termui](https://github.com/gizak/termui)
* [Docker](https://github.com/docker/docker)
* [Docker CLI](github.com/docker/cli/cli)

## Alternatives
See [Awesome Docker list](https://github.com/veggiemonk/awesome-docker/blob/master/README.md#terminal) for similar tools to work with Docker.