summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCan Güney Aksakalli <cgaksakalli@gmail.com>2019-07-31 16:36:42 +0200
committerCan Güney Aksakalli <cgaksakalli@gmail.com>2019-07-31 16:36:42 +0200
commit4613706808f20fcfb504b67a9daaf0fe68024965 (patch)
tree56b588baeff3a5adbac56760793817d1beb5782b
parent5c1ffddd2a088720dc1e8d776a9df4535cc29ef6 (diff)
docker local builds
-rw-r--r--Dockerfile11
-rw-r--r--README.md35
-rw-r--r--package-lock.json90
3 files changed, 61 insertions, 75 deletions
diff --git a/Dockerfile b/Dockerfile
index 7050fdb..9490573 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,9 +1,12 @@
-FROM node:4-slim
+FROM node:5-slim
ENV LANG=en_US.utf8 \
TERM=xterm-256color
-RUN apt-get update -y && apt-get upgrade -qy && \
- npm install gtop -g
+COPY lib lib
+COPY bin bin
+COPY package.json .
+COPY package-lock.json .
-ENTRYPOINT ["gtop"] \ No newline at end of file
+RUN npm install
+ENTRYPOINT ["./bin/gtop"]
diff --git a/README.md b/README.md
index 6c1e811..18e45dd 100644
--- a/README.md
+++ b/README.md
@@ -15,35 +15,20 @@ System monitoring dashboard for terminal.
### Installation
-```
+```sh
$ npm install gtop -g
```
-### Docker
-
-**To try it on the fly**, just run:
-
-```
-docker run --rm -it \
---name gtop \
---net="host" \
---pid="host" \
-devmtl/gtop:stable
-```
-
-**To use you own docker image:**:
-
-- Clone this repo
-- Build the docker image (from the Dockerfile) them, run the image
+#### Docker
-```
-docker build -t gtop .
+You need to assign host `net` and `pid` to access the metrics in the host machine.
-docker run --rm -it \
---name gtop \
---net="host" \
---pid="host" \
- gtop
+```sh
+$ docker run --rm -it \
+ --name gtop \
+ --net="host" \
+ --pid="host" \
+ aksakalli/gtop
```
### Usage
@@ -66,7 +51,7 @@ You can sort the process table by pressing
If you see question marks or other different characters, try to run it with these environment variables:
-```
+```sh
$ LANG=en_US.utf8 TERM=xterm-256color gtop
```
diff --git a/package-lock.json b/package-lock.json
index f0b7a0e..3c9ee2f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -27,6 +27,11 @@
"x256": ">=0.0.1"
}
},
+ "ansicolors": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.2.1.tgz",
+ "integrity": "sha1-vgiVmQl7dKXJxKhKDNvNtivYeu8="
+ },
"blessed": {
"version": "0.1.81",
"resolved": "https://registry.npmjs.org/blessed/-/blessed-0.1.81.tgz",
@@ -51,52 +56,6 @@
"strip-ansi": "^3.0.0",
"term-canvas": "0.0.5",
"x256": ">=0.0.1"
- },
- "dependencies": {
- "ansicolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.2.1.tgz",
- "integrity": "sha1-vgiVmQl7dKXJxKhKDNvNtivYeu8="
- },
- "cardinal": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-1.0.0.tgz",
- "integrity": "sha1-UOIcGwqjdyn5N33vGWtanOyTLuk=",
- "requires": {
- "ansicolors": "~0.2.1",
- "redeyed": "~1.0.0"
- }
- },
- "esprima": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.0.0.tgz",
- "integrity": "sha1-U88kes2ncxPlUcOqLnM0LT+099k="
- },
- "marked": {
- "version": "0.6.3",
- "resolved": "https://registry.npmjs.org/marked/-/marked-0.6.3.tgz",
- "integrity": "sha512-Fqa7eq+UaxfMriqzYLayfqAE40WN03jf+zHjT18/uXNuzjq3TY0XTbrAoPeqSJrAmPz11VuUA+kBPYOhHt9oOQ=="
- },
- "marked-terminal": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-1.7.0.tgz",
- "integrity": "sha1-yMRgiBx3LHYEtkNnAH7l938SWQQ=",
- "requires": {
- "cardinal": "^1.0.0",
- "chalk": "^1.1.3",
- "cli-table": "^0.3.1",
- "lodash.assign": "^4.2.0",
- "node-emoji": "^1.4.1"
- }
- },
- "redeyed": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-1.0.1.tgz",
- "integrity": "sha1-6WwZO0DAgWsArshCaY5hGF5VSYo=",
- "requires": {
- "esprima": "~3.0.0"
- }
- }
}
},
"bresenham": {
@@ -109,6 +68,15 @@
"resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz",
"integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s="
},
+ "cardinal": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-1.0.0.tgz",
+ "integrity": "sha1-UOIcGwqjdyn5N33vGWtanOyTLuk=",
+ "requires": {
+ "ansicolors": "~0.2.1",
+ "redeyed": "~1.0.0"
+ }
+ },
"chalk": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
@@ -166,6 +134,11 @@
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
+ "esprima": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.0.0.tgz",
+ "integrity": "sha1-U88kes2ncxPlUcOqLnM0LT+099k="
+ },
"event-stream": {
"version": "0.9.8",
"resolved": "https://registry.npmjs.org/event-stream/-/event-stream-0.9.8.tgz",
@@ -236,6 +209,23 @@
"xml2js": "^0.4.5"
}
},
+ "marked": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-0.6.3.tgz",
+ "integrity": "sha512-Fqa7eq+UaxfMriqzYLayfqAE40WN03jf+zHjT18/uXNuzjq3TY0XTbrAoPeqSJrAmPz11VuUA+kBPYOhHt9oOQ=="
+ },
+ "marked-terminal": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-1.7.0.tgz",
+ "integrity": "sha1-yMRgiBx3LHYEtkNnAH7l938SWQQ=",
+ "requires": {
+ "cardinal": "^1.0.0",
+ "chalk": "^1.1.3",
+ "cli-table": "^0.3.1",
+ "lodash.assign": "^4.2.0",
+ "node-emoji": "^1.4.1"
+ }
+ },
"memory-streams": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/memory-streams/-/memory-streams-0.1.3.tgz",
@@ -302,6 +292,14 @@
"string_decoder": "~0.10.x"
}
},
+ "redeyed": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-1.0.1.tgz",
+ "integrity": "sha1-6WwZO0DAgWsArshCaY5hGF5VSYo=",
+ "requires": {
+ "esprima": "~3.0.0"
+ }
+ },
"sax": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",