-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from jonathadv/feature-htop-poiting-to-host-proc
Build `htop` from source so that it can see host's processes
- Loading branch information
Showing
2 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
# Using a build stage in order to build htop using the flag `--with-proc=/proc_host` | ||
# which allows it to use a custom location instead of `/proc`. | ||
FROM alpine:3.6 as builder | ||
|
||
WORKDIR /build | ||
RUN apk add --update alpine-sdk build-base ncurses-dev autoconf automake curl unzip | ||
RUN curl -L https://github.com/hishamhm/htop/archive/master.zip --output htop.zip | ||
RUN unzip htop.zip | ||
RUN cd htop-master | ||
|
||
WORKDIR /build/htop-master | ||
RUN sh autogen.sh | ||
RUN sh configure --prefix=/build/htop-master/dist --with-proc=/proc_host | ||
RUN make | ||
RUN make install | ||
|
||
|
||
# Main Container | ||
FROM alpine:3.6 | ||
|
||
MAINTAINER Jonatha Daguerre <[email protected]> | ||
|
@@ -6,7 +24,6 @@ RUN apk add --no-cache \ | |
bash \ | ||
bind-tools \ | ||
curl \ | ||
htop \ | ||
iptraf-ng \ | ||
iotop \ | ||
jq \ | ||
|
@@ -19,3 +36,4 @@ RUN apk add --no-cache \ | |
tcpdump \ | ||
vim | ||
|
||
COPY --from=builder /build/htop-master/dist/bin/htop /usr/local/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters