Skip to content

Commit 4613706

Browse files
committed
docker local builds
1 parent 5c1ffdd commit 4613706

File tree

3 files changed

+61
-75
lines changed

3 files changed

+61
-75
lines changed

Dockerfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
FROM node:4-slim
1+
FROM node:5-slim
22

33
ENV LANG=en_US.utf8 \
44
TERM=xterm-256color
55

6-
RUN apt-get update -y && apt-get upgrade -qy && \
7-
npm install gtop -g
6+
COPY lib lib
7+
COPY bin bin
8+
COPY package.json .
9+
COPY package-lock.json .
810

9-
ENTRYPOINT ["gtop"]
11+
RUN npm install
12+
ENTRYPOINT ["./bin/gtop"]

README.md

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,20 @@ System monitoring dashboard for terminal.
1515

1616
### Installation
1717

18-
```
18+
```sh
1919
$ npm install gtop -g
2020
```
2121

22-
### Docker
23-
24-
**To try it on the fly**, just run:
25-
26-
```
27-
docker run --rm -it \
28-
--name gtop \
29-
--net="host" \
30-
--pid="host" \
31-
devmtl/gtop:stable
32-
```
33-
34-
**To use you own docker image:**:
35-
36-
- Clone this repo
37-
- Build the docker image (from the Dockerfile) them, run the image
22+
#### Docker
3823

39-
```
40-
docker build -t gtop .
24+
You need to assign host `net` and `pid` to access the metrics in the host machine.
4125

42-
docker run --rm -it \
43-
--name gtop \
44-
--net="host" \
45-
--pid="host" \
46-
gtop
26+
```sh
27+
$ docker run --rm -it \
28+
--name gtop \
29+
--net="host" \
30+
--pid="host" \
31+
aksakalli/gtop
4732
```
4833

4934
### Usage
@@ -66,7 +51,7 @@ You can sort the process table by pressing
6651

6752
If you see question marks or other different characters, try to run it with these environment variables:
6853

69-
```
54+
```sh
7055
$ LANG=en_US.utf8 TERM=xterm-256color gtop
7156
```
7257

package-lock.json

Lines changed: 44 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)