Top Related Projects
The lazier way to manage everything docker
Top-like interface for container metrics
Immersive terminal interface for managing docker containers and services
Given an existing docker container, prints the command line necessary to run a copy of it.
A tool for exploring each layer in a docker image
Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
Quick Overview
Dry is a terminal application that provides a user-friendly interface for managing Docker containers, images, and networks. It offers an interactive command-line experience, allowing users to monitor and control Docker resources without the need for complex Docker CLI commands.
Pros
- Intuitive and interactive terminal-based interface for Docker management
- Real-time monitoring of container resources and logs
- Easy navigation and control of Docker objects (containers, images, networks)
- Keyboard shortcuts for quick actions and improved productivity
Cons
- Limited to terminal environments, may not be suitable for users who prefer graphical interfaces
- Requires some familiarity with Docker concepts and terminology
- May not support all advanced Docker features or complex configurations
- Dependent on the Docker daemon being running and accessible
Getting Started
To get started with Dry, follow these steps:
-
Install Dry:
curl -sSf https://moncho.github.io/dry/dryup.sh | sudo sh
Or download the latest release from the GitHub releases page.
-
Ensure Docker is running on your system.
-
Run Dry:
dry
-
Use the arrow keys to navigate, press
h
for help, andq
to quit. -
Explore containers, images, and networks using the interface.
-
Use keyboard shortcuts (e.g.,
F1
,F2
,F3
) to switch between different views.
For more detailed instructions and usage information, refer to the project's README and documentation on GitHub.
Competitor Comparisons
The lazier way to manage everything docker
Pros of lazydocker
- More comprehensive feature set, including container logs, stats, and image management
- Actively maintained with frequent updates and bug fixes
- Better support for Docker Compose and Swarm
Cons of lazydocker
- Steeper learning curve due to more complex interface
- Requires more system resources to run
Code comparison
dry:
func (v *ContainerDetailsWidget) updateHeader() {
v.header.Clear()
v.header.AddText(v.container.Names[0], true, termui.AlignLeft, termui.ColorWhite)
v.header.AddText(v.container.ID[:12], true, termui.AlignRight, termui.ColorWhite)
}
lazydocker:
func (gui *Gui) renderContainerHeader(container *commands.Container) string {
return fmt.Sprintf(
"%s %s %s %s",
utils.ColoredString(container.Name, gui.Config.UserConfig.GUI.ContainerNameColor),
utils.ColoredString(container.ID[:12], gui.Config.UserConfig.GUI.ContainerIdColor),
utils.ColoredString(container.Status, gui.Config.UserConfig.GUI.ContainerStatusColor),
utils.ColoredString(container.Image, gui.Config.UserConfig.GUI.ContainerImageColor),
)
}
Both projects aim to provide terminal-based Docker management tools, but lazydocker offers a more feature-rich experience at the cost of increased complexity. dry focuses on simplicity and ease of use, making it a good choice for users who prefer a lightweight solution. The code comparison shows that lazydocker implements more customization options for its UI, while dry keeps things more straightforward.
Top-like interface for container metrics
Pros of ctop
- More comprehensive resource usage metrics, including detailed CPU and memory stats
- Supports multiple container runtimes beyond just Docker (e.g., rkt, LXC)
- Offers a single-container view with real-time graphs
Cons of ctop
- Less interactive functionality compared to dry (e.g., no container management)
- May have higher resource overhead due to more detailed metrics collection
- Limited customization options for the display layout
Code Comparison
dry:
func (v *ContainerDetailsWidget) updateHeader() {
v.header.Clear()
v.header.AddText(v.container.Name, true, termui.AlignLeft, termui.ColorWhite)
v.header.AddText(v.container.ID, true, termui.AlignRight, termui.ColorWhite)
}
ctop:
func (cm *ContainerMetrics) CPUUtil() float64 {
if cm.CPUUtil == nil {
return 0
}
return *cm.CPUUtil
}
Both projects use Go and focus on container monitoring, but dry offers more interactive features while ctop provides more detailed metrics. The code snippets show different approaches: dry focuses on UI updates, while ctop emphasizes metric calculations.
Immersive terminal interface for managing docker containers and services
Pros of dockly
- Built with Node.js, making it more accessible for JavaScript developers
- Offers a plugin system for extending functionality
- Provides a more colorful and visually appealing interface
Cons of dockly
- Less mature project with fewer stars and contributors
- May have performance limitations compared to Go-based alternatives
- Lacks some advanced features present in dry, such as container logs tailing
Code comparison
dockly (JavaScript):
const blessed = require('blessed')
const contrib = require('blessed-contrib')
const screen = blessed.screen()
const grid = new contrib.grid({rows: 12, cols: 12, screen: screen})
dry (Go):
func (h *Handlers) ContainerList(w http.ResponseWriter, r *http.Request) {
containers, err := h.client.ContainerList(context.Background(), types.ContainerListOptions{})
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
}
Both projects aim to provide terminal-based Docker management interfaces, but they differ in implementation language and some features. dry is written in Go and offers a more comprehensive set of features, while dockly is built with Node.js and focuses on ease of use and extensibility through plugins.
Given an existing docker container, prints the command line necessary to run a copy of it.
Pros of runlike
- Lightweight and focused on a single task: generating Docker run commands
- Easy to use as a command-line tool or import as a Python module
- Supports outputting commands for multiple containers at once
Cons of runlike
- Less feature-rich compared to dry's interactive terminal interface
- Limited to generating run commands, doesn't provide container management capabilities
- Less actively maintained, with fewer recent updates
Code comparison
dry:
func (v *ContainerDetailsWidget) updateHeader() {
header := NewHeader()
header.Add("Name", v.container.Names[0])
header.Add("ID", v.container.ID)
header.Add("Image", v.container.Image)
v.header = header
}
runlike:
def get_docker_run_cmd(container_id):
container = client.containers.get(container_id)
cmd = ['docker', 'run']
cmd.extend(get_container_options(container))
cmd.append(container.image.tags[0])
return ' '.join(cmd)
Both projects aim to assist with Docker container management, but they take different approaches. dry provides a comprehensive terminal UI for monitoring and managing containers, while runlike focuses solely on generating Docker run commands. dry offers more features and is more actively maintained, making it suitable for users who want a full-featured container management tool. runlike, on the other hand, is ideal for those who need a simple way to recreate container run commands, either programmatically or via the command line.
A tool for exploring each layer in a docker image
Pros of dive
- Provides a layer-by-layer analysis of Docker images, offering detailed insights into image composition
- Allows for interactive exploration of image layers, making it easier to identify large or unnecessary files
- Offers a content view for each layer, enabling users to inspect file changes between layers
Cons of dive
- Focuses primarily on image analysis, lacking broader Docker management features
- May have a steeper learning curve for users unfamiliar with Docker image internals
- Limited to analyzing local images, not providing remote registry exploration capabilities
Code comparison
dive:
func analyzeImage(imageID string, refTrees []*filetree.FileTree) (*image.AnalysisResult, error) {
analysis := &image.AnalysisResult{
Layers: make([]*image.Layer, 0),
}
// ... (additional analysis logic)
}
dry:
func (d *Dry) refreshContainers() error {
containers, err := d.dockerDaemon.Containers()
if err != nil {
return err
}
d.containerList = containers
return nil
}
Summary
While dive excels in detailed Docker image analysis, dry offers a more comprehensive Docker management interface. dive provides in-depth layer exploration and file change tracking, making it ideal for optimizing image sizes. On the other hand, dry focuses on overall Docker container management, offering a broader set of features for monitoring and interacting with containers. The choice between the two depends on whether the user needs specialized image analysis (dive) or general Docker management capabilities (dry).
Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
Pros of Glances
- More comprehensive system monitoring, covering CPU, memory, network, disk, and processes
- Cross-platform support (Linux, macOS, Windows)
- Extensible plugin system for additional metrics and integrations
Cons of Glances
- Lacks Docker-specific features and container management capabilities
- May be more resource-intensive due to its broader monitoring scope
- Steeper learning curve for users primarily interested in Docker monitoring
Code Comparison
Glances (Python):
from glances_api import Glances
glances = Glances()
cpu_percent = glances.cpu.percent
print(f"CPU Usage: {cpu_percent}%")
Dry (Go):
package main
import "github.com/moncho/dry/appui"
func main() {
stats := appui.NewDockerStats()
cpuUsage := stats.CPUPercentage()
fmt.Printf("CPU Usage: %.2f%%\n", cpuUsage)
}
Summary
Glances offers broader system monitoring capabilities and cross-platform support, making it suitable for general-purpose monitoring. However, it lacks Docker-specific features compared to Dry. Dry focuses on Docker container management and monitoring, providing a more specialized tool for Docker users. The code examples demonstrate the different approaches: Glances uses a Python API for general system metrics, while Dry utilizes Go for Docker-specific statistics.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
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.
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:
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.
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 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 for the full license text.
Credits
Built on top of:
Alternatives
See Awesome Docker list for similar tools to work with Docker.
Top Related Projects
The lazier way to manage everything docker
Top-like interface for container metrics
Immersive terminal interface for managing docker containers and services
Given an existing docker container, prints the command line necessary to run a copy of it.
A tool for exploring each layer in a docker image
Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot