Giter Club home page Giter Club logo

docker-dashboard's Introduction

Docker Dashboard npm version Build Status UT

💻📈Console based docker dashboard, base on blessed and blessed-contrib.

Install

$ npm install -g docker-dashboard

Note: need to install the docker before use, and only support unix socket.

In the following environment test passed:

OS Docker Nodejs
Ubuntu 16.04 LTS v1.12.6 v8.10.0
Fedora 25 v1.12.6 v8.11.1

Other system and versions are not guaranteed.

Usage

$ docker-dashboard

Shortcut

shortcut description
D show node info, warm info and others.
C show container list.
I show image list.
N show network list.
V show volume list.
H help.
scroll up.
scroll down.
Enter select a container and show statistics.
Q exit dashboard.

Support operation with mouse.

Development

run with resource:

$ git clone [email protected]:pipiliang/docker-dashboard
$ cd docker-dashboard
$ npm i
$ npm run build
$ npm test
$ npm start

Debug by VSCode

launch.json :

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Debug",
            "type": "node",
            "request": "launch",
            "args": [
                "${workspaceRoot}/src/index.ts"
            ],
            "runtimeArgs": [
                "--nolazy",
                "-r",
                "ts-node/register"
            ],
            "sourceMaps": true,
            "cwd": "${workspaceRoot}",
            "protocol": "inspector",
            "console": "integratedTerminal"
        }
    ]
}

Thanks

License

npm

docker-dashboard's People

Contributors

pipiliang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-dashboard's Issues

Does not show all the containers shown with docker ps

I have kubernetes dashboard containers running, which shows on docker ps, ( started via kubectl not docker run, but running on the same docker desktop linux-kit vm on mac) but not on this dashboard. Is this expected behaviour as its not run via docker run but kubectl?
Screen Shot 2020-06-15 at 1 11 04 PM

Screen Shot 2020-06-15 at 1 05 15 PM

TypeError on Fedora

$ sudo docker-dashboard
TypeError: Cannot read property 'IPAddress' of undefined
    at Object.utils.toRow (/usr/lib/node_modules/docker-dashboard/lib/utils.js:17:79)
    at containers.forEach.containerInfo (/usr/lib/node_modules/docker-dashboard/lib/widget-container.js:75:20)
    at Array.forEach (<anonymous>)
    at Object.callback (/usr/lib/node_modules/docker-dashboard/lib/widget-container.js:74:14)
    at /usr/lib/node_modules/docker-dashboard/node_modules/dockerode/lib/docker.js:429:12
    at Modem.buildPayload (/usr/lib/node_modules/docker-dashboard/node_modules/docker-modem/lib/modem.js:270:7)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/docker-dashboard/node_modules/docker-modem/lib/modem.js:229:14)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
$ sudo docker-dashboard
TypeError: Cannot read property '0' of null
    at images.forEach.s (/usr/lib/node_modules/docker-dashboard/lib/widget-images.js:26:23)
    at Array.forEach (<anonymous>)
    at Object.self.docker.listImages [as callback] (/usr/lib/node_modules/docker-dashboard/lib/widget-images.js:23:10)
    at /usr/lib/node_modules/docker-dashboard/node_modules/dockerode/lib/docker.js:465:12
    at Modem.buildPayload (/usr/lib/node_modules/docker-dashboard/node_modules/docker-modem/lib/modem.js:270:7)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/docker-dashboard/node_modules/docker-modem/lib/modem.js:229:14)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)

crash on RHEL7

[root@ding ~]# docker-dashboard
TypeError: value.toFixed is not a function
at formatYLabel (/usr/lib/node_modules/docker-dashboard/node_modules/blessed-contrib/lib/widget/charts/line.js:114:23)
at getMaxXLabelPadding (/usr/lib/node_modules/docker-dashboard/node_modules/blessed-contrib/lib/widget/charts/line.js:121:14)
at Line.setData (/usr/lib/node_modules/docker-dashboard/node_modules/blessed-contrib/lib/widget/charts/line.js:124:22)
at refreshData (/usr/lib/node_modules/docker-dashboard/lib/widget-container.js:86:11)
at IncomingMessage. (/usr/lib/node_modules/docker-dashboard/lib/widget-container.js:138:6)
at emitOne (events.js:116:13)
at IncomingMessage.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at IncomingMessage.Readable.push (_stream_readable.js:208:10)

Set options for log file

Hi there,

This is a great tool – I use it in both local and UAT environments and cannot recommended it enough –, still I'd love to be able to set some basic log file options such as the path and the log mode that this generates.

I can see that the current src/common/log.ts has some functionalities such as "debug", "info", "error" and "warn", but still cannot make docker-dashboard start in "error" mode or any other less-verbose mode, so if I run this tool during a couple hours in my local environment I may end up with a docker-dashboard.log file of ~2 MB.

Is this possible to do?

Crash on mac

Happens with node v6.9.1, directly on launch

TypeError: text.replace is not a function
    at Object.helpers.stripTags (/Users/lionel/.nvm/versions/node/v6.9.4/lib/node_modules/docker-dashboard/node_modules/blessed/lib/helpers.js:137:6)
    at ScrollableBox.Element.strWidth (/Users/lionel/.nvm/versions/node/v6.9.4/lib/node_modules/docker-dashboard/node_modules/blessed/lib/widgets/element.js:2543:15)
    at /Users/lionel/.nvm/versions/node/v6.9.4/lib/node_modules/docker-dashboard/node_modules/blessed/lib/widgets/table.js:71:23
    at Array.forEach (native)
    at /Users/lionel/.nvm/versions/node/v6.9.4/lib/node_modules/docker-dashboard/node_modules/blessed/lib/widgets/table.js:70:9
    at Array.forEach (native)
    at ScrollableBox.Table._calculateMaxes (/Users/lionel/.nvm/versions/node/v6.9.4/lib/node_modules/docker-dashboard/node_modules/blessed/lib/widgets/table.js:69:13)
    at ScrollableBox.ListTable.render (/Users/lionel/.nvm/versions/node/v6.9.4/lib/node_modules/docker-dashboard/node_modules/blessed/lib/widgets/listtable.js:171:8)
    at /Users/lionel/.nvm/versions/node/v6.9.4/lib/node_modules/docker-dashboard/node_modules/blessed/lib/widgets/element.js:2334:8
    at Array.forEach (native)

Crash when opening images

App is crashing when clicking on "Images", on ubuntu server 16.04

$ docker-dashboard 
TypeError: Cannot read property '0' of null
    at images.forEach.s (/usr/lib/node_modules/docker-dashboard/lib/widget-images.js:26:23)
    at Array.forEach (native)
    at Object.self.docker.listImages [as callback] (/usr/lib/node_modules/docker-dashboard/lib/widget-images.js:23:10)
    at /usr/lib/node_modules/docker-dashboard/node_modules/dockerode/lib/docker.js:460:12
    at Modem.buildPayload (/usr/lib/node_modules/docker-dashboard/node_modules/docker-modem/lib/modem.js:259:7)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/docker-dashboard/node_modules/docker-modem/lib/modem.js:218:14)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)

fedora无法正常使用

TypeError: Cannot read property 'length' of null
at /usr/lib/node_modules/docker-dashboard/lib/widget-home.js:79:44 v:📔 Volumes a:👦 About at process._tickCallback (internal/process/next_tick.js:109:7)

SyntaxError: Unexpected end of JSON input at JSON.parse

[2020-06-05T08:36:56.066] [ERROR] default - SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at IncomingMessage.stream.on (/usr/lib/node_modules/docker-dashboard/dist/common/docker/container.js:57:39) at IncomingMessage.emit (events.js:198:13) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:269:11) at IncomingMessage.Readable.push (_stream_readable.js:224:10) at HTTPParser.parserOnBody (_http_common.js:124:22) at Socket.socketOnData (_http_client.js:451:20) at Socket.emit (events.js:198:13) at addChunk (_stream_readable.js:288:12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.