1 | <p align="center">
|
2 | <br>
|
3 | <img width="200" src="https://user-images.githubusercontent.com/316371/28937414-67ee5ffa-7893-11e7-95f9-5059cacf9170.png">
|
4 | <br>
|
5 | Immersive terminal interface for managing docker containers, services and images
|
6 | </p>
|
7 |
|
8 |
|
9 | [![Node Version](https://img.shields.io/badge/node-%3E=7.6.0-brightgreen.svg)]()
|
10 | [![view on npm](http://img.shields.io/npm/v/dockly.svg)](https://www.npmjs.org/package/dockly)
|
11 | [![view on npm](http://img.shields.io/npm/l/dockly.svg)](https://www.npmjs.org/package/dockly)
|
12 | [![npm module downloads](http://img.shields.io/npm/dt/dockly.svg)](https://www.npmjs.org/package/dockly)
|
13 | [![Security Responsible Disclosure](https://img.shields.io/badge/Security-Responsible%20Disclosure-yellow.svg)](./SECURITY.md
|
14 | )
|
15 | [![dockly](https://snyk.io/advisor/npm-package/dockly/badge.svg)](https://snyk.io/advisor/npm-package/dockly)
|
16 |
|
17 | Dockly has been highlighted, featured and chosen as favorite docker container management tool on:
|
18 |
|
19 | [![Awesome Docker](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/veggiemonk/awesome-docker) [![DevOps Weekly](https://img.shields.io/badge/DevOpsWeekly-%F0%9F%95%B6-yellow.svg
|
20 | )](http://devopsweekly.com)
|
21 | [![terminals are sexy](https://img.shields.io/badge/TerminalsAreSexy-%F0%9F%92%BB-green.svg
|
22 | )](https://github.com/k4m4/terminals-are-sexy) [![Programmer's Weekly](https://img.shields.io/badge/ProgrammersWeekly-%F0%9F%95%B6-purple.svg
|
23 | )](https://mailchi.mp/programmerweekly/programmer-weekly-issue-94?e=e8c11d0390) [![Console.dev](https://img.shields.io/badge/ConsoleDotDev-%F0%9F%95%B6-blue.svg
|
24 | )](https://console.dev/tools/)
|
25 |
|
26 | <a href="https://console.dev" title="Visit Console - the best tools for developers"><img src="https://console.dev/img/badges/1.0/png/console-badge-pick-green1-dark.png" alt="Console - Developer Tool of the Week" /></a>
|
27 |
|
28 | ![dockly-demo-2](https://cloud.githubusercontent.com/assets/316371/25682867/c5212216-3027-11e7-8f36-72d38516d2af.gif)
|
29 |
|
30 | # Install
|
31 | Install the API module as a dependency in your project so you can easily use it to query Operations Orchestration REST API
|
32 |
|
33 | ```javascript
|
34 | npm install -g dockly
|
35 | ```
|
36 |
|
37 | # Usage
|
38 |
|
39 | Just fire up dockly and it will automatically connect to your localhost docker daemon through the unix socket:
|
40 |
|
41 | ```
|
42 | dockly
|
43 | ```
|
44 |
|
45 | ## Command line options:
|
46 |
|
47 | It's also possible to provide command line options for dockly to customize the docker connection
|
48 |
|
49 | | Param | Type | Description |
|
50 | | --- | --- | --- |
|
51 | | -s or --socketPath | string | Docker socket to connect to |
|
52 | | -H or --host | string | Remote docker daemon host to connect to |
|
53 | | -P or --port | string | Remote docker port to connect to |
|
54 | | -T or --protocol | `http` \| `https` \| `ssh` | Remote docker protocol to connect to |
|
55 | | --containerFilters | string | String to apply to filter shown containers |
|
56 | | -h or --help | null | Display help |
|
57 | | -v or --version | null | Display version information |
|
58 |
|
59 | ### `--containerFilters`
|
60 |
|
61 | This is a string that could be used to filter the shown containers;
|
62 | 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](https://docs.docker.com/engine/api/v1.37/#operation/ContainerList)
|
63 |
|
64 | Example: `--containerFilters="name=test&status=running"` to only show *running* container which name match *test*.
|
65 |
|
66 | # Docker Support
|
67 |
|
68 | ## Run from docker
|
69 |
|
70 | You can run dockly using docker:
|
71 |
|
72 | ```
|
73 | docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock lirantal/dockly
|
74 | ```
|
75 |
|
76 |
|
77 | ## Build
|
78 |
|
79 | If you wish to build dockly as a docker image yourself, you can run the following:
|
80 |
|
81 | ```
|
82 | $ docker build -t dockly .
|
83 |
|
84 | $ docker run -it --rm --name dockly -v /var/run/docker.sock:/var/run/docker.sock dockly
|
85 | ```
|
86 |
|
87 | # FAQ
|
88 |
|
89 | 1. Unsupported Node.js version
|
90 |
|
91 | If you're getting the following error in your CLI:
|
92 | ```
|
93 | root@neo:~# dockly
|
94 | /usr/local/lib/node_modules/dockly/src/screen.js:36
|
95 | constructor (utils = new Map()) {
|
96 | ^
|
97 |
|
98 | SyntaxError: Unexpected token =
|
99 | at exports.runInThisContext (vm.js:53:16)
|
100 | at Module._compile (module.js:374:25)
|
101 | ```
|
102 |
|
103 | Or this kind of error:
|
104 | ```
|
105 | Trace: TypeError: Object.values is not a function
|
106 | at screen.toggleMode (/home/vokiel/.nvm/versions/node/v6.11.1/lib/node_modules/dockly/src/screen.js:149:35)
|
107 | at Screen.screen.key (/home/vokiel/.nvm/versions/node/v6.11.1/lib/node_modules/dockly/src/screen.js:190:12)
|
108 | at Screen.EventEmitter._emit
|
109 | (/home/vokiel/.nvm/versions/node/v6.11.1/lib/node_modules/dockly/node_modules/blessed/lib/events.js:98:20)
|
110 | ```
|
111 |
|
112 | This is most likely because you're using an unsupported Node.js version.
|
113 | Dockly requires Node.js v7.6 and above
|
114 |
|
115 | 2. PuTTY displays garbled text
|
116 |
|
117 | Follow the steps [in this comment](https://github.com/lirantal/dockly/issues/50#issuecomment-536190949) to enable VT100 support on the settings for the window
|
118 |
|
119 | 3. Icons not working properly
|
120 |
|
121 | set `LANG` and `LC_ALL` to c.UTF-8 like so
|
122 | ```bash
|
123 | export LANG=C.UTF-8
|
124 | export LC_ALL=C.UTF-8
|
125 | ```
|
126 | for more info please see [this issue](https://github.com/yaronn/blessed-contrib/issues/111)
|
127 |
|
128 | ## Alternatives
|
129 |
|
130 | See [Awesome Docker list](https://github.com/veggiemonk/awesome-docker/blob/master/README.md#terminal) for similar tools to work with Docker.
|
131 |
|
132 | # In the news
|
133 |
|
134 | - Admin Magazine article: [Visualizing containers with clarity
|
135 | ](https://www.admin-magazine.com/Articles/Visualizing-containers-with-clarity)
|
136 | - [A learnk8s tweet](https://twitter.com/learnk8s/status/1075677503782563840)
|
137 | - [Dockly – Manage Docker Containers From Terminal](https://ostechnix.com/dockly-manage-docker-containers-from-terminal/)
|
138 | - [Clever cloud CEO, Quentin Adam, tweeting about dockly](https://twitter.com/waxzce/status/1123886351924043777)
|
139 |
|
140 | # Author
|
141 | Liran Tal <liran.tal@gmail.com>
|