File tree 2 files changed +22
-27
lines changed 2 files changed +22
-27
lines changed Original file line number Diff line number Diff line change @@ -42,33 +42,7 @@ docker run -ti --name ctop --rm -v /var/run/docker.sock:/var/run/docker.sock qua
42
42
43
43
## Building
44
44
45
- To build ` ctop ` from source, ensure you have a recent version of [ glide] ( https://github.com/Masterminds/glide ) installed and run:
46
-
47
- ``` bash
48
- git clone https://github.com/bcicen/ctop.git $GOPATH /src/github.com/bcicen/ctop && \
49
- cd $GOPATH /src/github.com/bcicen/ctop && \
50
- make build
51
- ```
52
-
53
- To build a minimal Docker image containing only ` ctop ` , follow the build instructions above up through ` glide install ` , then:
54
-
55
- ``` bash
56
- CGO_ENABLED=0 go build -a
57
- [[ ! -d docker-build ]] && mkdir docker-build
58
- cd docker-build && cp ../ctop ./
59
- cat > Dockerfile << - "EOF "
60
- FROM scratch
61
- COPY ./ctop /ctop
62
- ENTRYPOINT ["/ctop"]
63
- EOF
64
- docker build -t ctop .
65
- ```
66
-
67
- Now you can run ctop as above:
68
-
69
- ``` bash
70
- docker run -ti --name ctop --rm -v /var/run/docker.sock:/var/run/docker.sock ctop
71
- ```
45
+ Build steps can be found [ here] [ build ] .
72
46
73
47
## Usage
74
48
@@ -102,4 +76,5 @@ s | Select container sort field
102
76
r | Reverse container sort order
103
77
q | Quit ctop
104
78
79
+ [ build ] : _docs/build.md
105
80
[ expanded_view ] : _docs/expanded.md
Original file line number Diff line number Diff line change
1
+ # Build
2
+
3
+ To build ` ctop ` from source, ensure you have a recent version of [ glide] ( https://github.com/Masterminds/glide ) installed and run:
4
+
5
+ ``` bash
6
+ go get github.com/bcicen/ctop && \
7
+ cd $GOPATH /src/github.com/bcicen/ctop && \
8
+ make build
9
+ ```
10
+
11
+ To build a minimal Docker image containing only ` ctop ` :
12
+ ``` bash
13
+ make image
14
+ ```
15
+
16
+ Now you can run your local image:
17
+
18
+ ``` bash
19
+ docker run -ti --name ctop --rm -v /var/run/docker.sock:/var/run/docker.sock ctop
20
+ ```
You can’t perform that action at this time.
0 commit comments