MCPcopy Index your code
hub / github.com/lirantal/dockly

github.com/lirantal/dockly @v3.24.5 sqlite

repository ↗ · DeepWiki ↗ · release v3.24.5 ↗
299 symbols 512 edges 54 files 5 documented · 2%
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

Param Type Description
-s or --socketPath string Docker socket to connect to
-H or --host string Remote docker daemon host to connect to
-P or --port string Remote docker port to connect to
-T or --protocol http | https | ssh Remote docker protocol to connect to
--containerFilters string String to apply to filter shown containers
-h or --help null Display help
-v or --version null Display 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


<a href="https://nodejs-security.com">
  <img alt="Node.js Security" align="center" src="https://img.shields.io/badge/%F0%9F%A6%84-Learn%20Node.js%20Security%E2%86%92-gray.svg?colorA=5734F5&colorB=5734F5&style=flat" />
</a>

Screenshot 2024-09-12 at 20 08 07

Learn Node.js Secure Coding techniques and best practices from <a href="https://www.lirantal.com">Liran Tal</a>

Core symbols most depended-on inside this repo

render
called by 22
src/screen.js
getWidgetStyle
called by 16
src/baseWidget.js
focus
called by 14
src/baseWidget.js
getContainer
called by 7
src/dockerUtil.js
getSelectedContainer
called by 7
widgets/containers/containerList.widget.js
update
called by 5
widgets/containers/containerStatus.widget.js
update
called by 5
widgets/services/servicesStatus.widget.js
listImages
called by 4
src/dockerUtil.js

Shape

Method 215
Class 73
Function 11

Languages

TypeScript100%

Modules by API surface

src/dockerUtil.js22 symbols
src/screen.js17 symbols
widgets/containers/containerList.widget.js15 symbols
src/widgetsTemplates/list.widget.template.js15 symbols
widgets/images/imageList.widget.js13 symbols
widgets/services/servicesList.widget.js11 symbols
widgets/containers/containerSortList.widget.js11 symbols
src/widgetsTemplates/help.widget.template.js11 symbols
widgets/actionsMenu.widget.js10 symbols
src/widgetsTemplates/info.widget.template.js10 symbols
hooks/containers.hook.js10 symbols
src/widgetsTemplates/logs.widget.template.js9 symbols

Dependencies from manifests, versioned

blessed0.1.81 · 1×
blessed-contrib4.10.1 · 1×
chalk4 · 1×
clipboardy2.3.0 · 1×
command-line-args5.2.1 · 1×
command-line-usage5.0.5 · 1×
dockerode3.3.5 · 1×
figures2.0.0 · 1×
gatsby4.5.0 · 1×
gatsby-plugin-google-analytics2.1.16 · 1×
gatsby-plugin-manifest3.13.0 · 1×
gatsby-plugin-offline2.0.25 · 1×

For agents

$ claude mcp add dockly \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact