Convert Figma logo to code with AI

lirantal logodockly

Immersive terminal interface for managing docker containers and services

3,761
150
3,761
9

Top Related Projects

The lazier way to manage everything docker

15,424

Top-like interface for container metrics

2,954

dry - A Docker manager for the terminal @

26,263

Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.

45,415

A tool for exploring each layer in a docker image

1,908

Given an existing docker container, prints the command line necessary to run a copy of it.

Quick Overview

Dockly is a terminal user interface (TUI) for managing Docker containers, images, networks, and volumes. It provides a visually appealing and interactive way to interact with Docker from the command line.

Pros

  • Intuitive Interface: Dockly offers a clean and user-friendly interface, making it easy to navigate and manage Docker resources.
  • Real-time Updates: The tool continuously updates the displayed information, ensuring that users have the latest data on their Docker environment.
  • Keyboard Shortcuts: Dockly supports various keyboard shortcuts, allowing users to quickly perform common actions without the need for mouse interactions.
  • Cross-platform Compatibility: Dockly can be used on Windows, macOS, and Linux, making it a versatile tool for Docker management.

Cons

  • Limited Functionality: While Dockly provides a good overview of Docker resources, it may lack some advanced features or customization options compared to other Docker management tools.
  • Dependency on Docker: Dockly is entirely dependent on the Docker engine, and users must have Docker installed and configured correctly for the tool to function properly.
  • Potential Performance Issues: Depending on the size and complexity of the Docker environment, Dockly may experience performance issues when handling a large number of containers or resources.
  • Lack of Offline Functionality: Dockly requires an active connection to the Docker daemon, and users may not be able to access or manage their Docker resources without an internet connection.

Code Examples

N/A (Dockly is not a code library)

Getting Started

To get started with Dockly, follow these steps:

  1. Ensure that you have Docker installed and running on your system.

  2. Install Dockly using npm (Node.js package manager):

    npm install -g dockly
    
  3. Once the installation is complete, run the following command to start Dockly:

    dockly
    
  4. The Dockly interface will appear in your terminal, displaying information about your Docker environment, including running containers, images, networks, and volumes.

  5. Use the arrow keys to navigate through the different sections, and press the corresponding keys (e.g., "c" for containers, "i" for images) to interact with the resources.

  6. Explore the various keyboard shortcuts available in Dockly by pressing the "?" key to access the help menu.

  7. Customize the appearance and behavior of Dockly by modifying the configuration file located at ~/.config/dockly/config.json.

That's it! You can now use Dockly to manage your Docker environment from the comfort of your terminal.

Competitor Comparisons

The lazier way to manage everything docker

Pros of lazydocker

  • More feature-rich interface with advanced functionality like logs, stats, and container management
  • Supports keyboard shortcuts for faster navigation and operation
  • Offers a customizable configuration file for tailoring the interface and behavior

Cons of lazydocker

  • Steeper learning curve due to more complex interface and features
  • Requires Go installation for building from source
  • May be overwhelming for users who need only basic Docker monitoring

Code Comparison

lazydocker:

func (gui *Gui) getMainView() *gocui.View {
    v, err := gui.g.View("main")
    if err != nil {
        return nil
    }
    return v
}

dockly:

const getContainers = async () => {
  const containers = await dockerApi.listContainers()
  return containers
}

Both projects aim to provide a terminal-based UI for Docker management, but they differ in implementation and feature set. lazydocker offers a more comprehensive solution with advanced features and customization options, while dockly focuses on simplicity and ease of use for basic Docker monitoring tasks. The code snippets showcase the different programming languages used: Go for lazydocker and JavaScript for dockly, reflecting their distinct approaches to solving similar problems in Docker management.

15,424

Top-like interface for container metrics

Pros of ctop

  • Written in Go, potentially offering better performance
  • Supports both Docker and runC containers
  • Provides a single binary release, simplifying installation

Cons of ctop

  • Less customizable interface compared to Dockly
  • Fewer filtering options for container views
  • Limited to terminal-based usage without web interface support

Code Comparison

ctop (Go):

func (cm *ContainerMetrics) CPUUtil() float64 {
    return round(cm.cur.CPUUtil, 2)
}

Dockly (JavaScript):

function getCpuPercentage (stats) {
  const cpuPercent = calculateCPUPercentUnix(stats)
  return cpuPercent.toFixed(2)
}

Both projects aim to provide real-time monitoring for Docker containers, but they differ in implementation language and feature sets. ctop, written in Go, offers potential performance benefits and broader container support. However, Dockly, built with JavaScript, provides a more customizable interface and additional features like web-based access.

ctop's single binary release simplifies installation, while Dockly requires Node.js and npm. The code comparison shows similar approaches to calculating CPU utilization, with ctop using a custom rounding function and Dockly leveraging JavaScript's built-in toFixed method.

Ultimately, the choice between these tools depends on specific requirements, such as performance needs, desired customization options, and preferred programming language ecosystem.

2,954

dry - A Docker manager for the terminal @

Pros of dry

  • More comprehensive feature set, including container management and image operations
  • Better performance and resource usage, especially for large Docker environments
  • More active development and frequent updates

Cons of dry

  • Steeper learning curve due to more complex interface and features
  • Less focus on real-time monitoring compared to dockly
  • May be overwhelming for users who only need basic Docker monitoring

Code comparison

dry:

func (d *Dry) showContainers() {
    containers, err := d.dockerDaemon.Containers()
    if err != nil {
        d.appmessage(err.Error())
        return
    }
    d.containerList.Render(containers)
}

dockly:

async function getContainers() {
  try {
    const containers = await docker.listContainers({ all: true })
    return containers
  } catch (error) {
    return []
  }
}

Both projects aim to provide Docker monitoring and management capabilities through terminal-based interfaces. dry offers a more feature-rich experience with advanced container and image management, while dockly focuses on simplicity and real-time monitoring. dry is written in Go, which contributes to its performance advantages, whereas dockly is built with JavaScript and Node.js, making it more accessible for web developers. The choice between the two depends on the user's specific needs and familiarity with the respective ecosystems.

26,263

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, disk, network, and processes
  • Cross-platform support (Linux, macOS, Windows)
  • Extensible plugin system for additional metrics and integrations

Cons of Glances

  • Larger codebase and potentially higher resource usage
  • Steeper learning curve due to more features and configuration options
  • Less focused on Docker-specific monitoring compared to Dockly

Code Comparison

Glances (Python):

def get_docker_client():
    try:
        return docker.from_env()
    except DockerException as e:
        logger.warning("Can't connect to Docker API (%s)" % e)
        return None

Dockly (JavaScript):

const dockerCon = new Docker({
  socketPath: '/var/run/docker.sock'
})

dockerCon.listContainers((err, containers) => {
  // Handle containers
})

Both projects provide system monitoring capabilities, but Glances offers a more comprehensive solution for overall system metrics, while Dockly focuses specifically on Docker container monitoring. Glances is written in Python and has a larger feature set, making it suitable for general system administration tasks. Dockly, on the other hand, is written in JavaScript and provides a more streamlined, Docker-centric monitoring experience with a user-friendly terminal UI.

45,415

A tool for exploring each layer in a docker image

Pros of dive

  • Focuses specifically on analyzing Docker image layers, providing detailed insights into image composition
  • Offers a visual representation of layer contents and file changes between layers
  • Allows for efficient identification of large or unnecessary files in Docker images

Cons of dive

  • Limited to Docker image analysis, lacking broader container management features
  • Requires local installation and doesn't offer remote monitoring capabilities
  • May have a steeper learning curve for users unfamiliar with Docker image internals

Code comparison

dive:

func analyzeImageLayers(imageID string) error {
    layers, err := docker.GetImageLayers(imageID)
    if err != nil {
        return err
    }
    // Analyze and display layer information
}

dockly:

const dockerCLI = new Docker();
dockerCLI.listContainers((err, containers) => {
  if (err) throw err;
  // Display container information in the UI
});

Summary

While dive excels at in-depth Docker image analysis, dockly provides a more comprehensive container management interface. dive is ideal for optimizing Docker images, whereas dockly offers a user-friendly dashboard for monitoring and managing multiple containers. The choice between the two depends on whether the user needs detailed image analysis or broader container management capabilities.

1,908

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
  • Easier to integrate into scripts or other tools
  • Faster execution for simple use cases

Cons of runlike

  • Limited functionality compared to dockly's comprehensive Docker management features
  • Lacks a user-friendly interface for monitoring and managing containers
  • No real-time updates or interactive elements

Code comparison

runlike:

def get_docker_client():
    return docker.from_env()

def get_container(container_id):
    return get_docker_client().containers.get(container_id)

dockly:

const dockerCLI = new Docker()

const getContainers = async () => {
  return dockerCLI.listContainers()
}

const getContainerStats = async (containerId) => {
  const container = dockerCLI.getContainer(containerId)
  return container.stats({ stream: false })
}

While both projects interact with Docker, runlike focuses on generating run commands, whereas dockly provides a more comprehensive set of Docker management functions. runlike's code is simpler and more focused, while dockly's code demonstrates its broader functionality and real-time monitoring capabilities.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README



Immersive terminal interface for managing docker containers, services and images

Node Version view on npm view on npm npm module downloads Security Responsible Disclosure dockly

Dockly has been highlighted, featured and chosen as favorite docker container management tool on:

Awesome Docker DevOps Weekly terminals are sexy Programmer's Weekly Console.dev

Console - Developer Tool of the Week

dockly-demo-2

Install

Install the API module as a dependency in your project so you can easily use it to query Operations Orchestration REST API

npm install -g dockly

Usage

Just fire up dockly and it will automatically connect to your localhost docker daemon through the unix socket:

dockly

Command line options:

It's also possible to provide command line options for dockly to customize the docker connection

ParamTypeDescription
-s or --socketPathstringDocker socket to connect to
-H or --hoststringRemote docker daemon host to connect to
-P or --portstringRemote docker port to connect to
-T or --protocolhttp | https | sshRemote docker protocol to connect to
--containerFiltersstringString to apply to filter shown containers
-h or --helpnullDisplay help
-v or --versionnullDisplay version information

--containerFilters

This is a string that could be used to filter the shown containers; its format is in the x-www-form-urlencoded style and the filters you could apply are listed here: https://docs.docker.com/engine/api/v1.37/#operation/ContainerList

Example: --containerFilters="name=test&status=running" to only show running container which name match test.

Docker Support

Run from docker

You can run dockly using docker:

docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock lirantal/dockly

Build

If you wish to build dockly as a docker image yourself, you can run the following:

$ docker build -t dockly .

$ docker run -it --rm --name dockly -v /var/run/docker.sock:/var/run/docker.sock dockly

FAQ

  1. Unsupported Node.js version

If you're getting the following error in your CLI:

root@neo:~# dockly
/usr/local/lib/node_modules/dockly/src/screen.js:36
constructor (utils = new Map()) {
^

SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)

Or this kind of error:

Trace: TypeError: Object.values is not a function                                                                                                            
    at screen.toggleMode (/home/vokiel/.nvm/versions/node/v6.11.1/lib/node_modules/dockly/src/screen.js:149:35)
    at Screen.screen.key (/home/vokiel/.nvm/versions/node/v6.11.1/lib/node_modules/dockly/src/screen.js:190:12)
    at Screen.EventEmitter._emit
    (/home/vokiel/.nvm/versions/node/v6.11.1/lib/node_modules/dockly/node_modules/blessed/lib/events.js:98:20)

This is most likely because you're using an unsupported Node.js version. Dockly requires Node.js v7.6 and above

  1. PuTTY displays garbled text

Follow the steps in this comment to enable VT100 support on the settings for the window

  1. Icons not working properly

set LANG and LC_ALL to c.UTF-8 like so

export LANG=C.UTF-8
export LC_ALL=C.UTF-8

for more info please see this issue

Alternatives

See Awesome Docker list for similar tools to work with Docker.

In the news

Author

Liran Tal liran.tal@gmail.com

NPM DownloadsLast 30 Days