Public Repository

Last pushed: a year ago
Short Description
small docker image for nethogs (less than 7 Mb)
Full Description

I define an alias
alias nethogs='docker run -it --net=host --pid=host --rm k3ck3c/nethogs'

(the "--net=host" is mandatory, as you will not "see" any network device if you omit it,)

so just
will monitor wlan0
nethogs eth0
will monitor eth0 (or accordingly ra1, or wlp2s0...)

the modified Dockerfile, in order to avoid

"creating socket failed while establishing local IP - are you root?"

FROM alpine:latest
RUN apk update && apk add wget\
&& wget --no-check-certificate -c \
&& tar zvxf v0.8.1.tar.gz \
&& cd ./nethogs-0.8.1/ \
&& echo "export ARCH=x86" >> Makefile \
&& apk add sudo linux-headers ncurses-dev libpcap-dev make g++\
&& echo "@testing" >> /etc/apk/repositories \
&& apk update \
&& apk add libpcap libstdc++ libgcc nethogs@testing\
&& make && sudo make install\
&& apk del sudo g++ make linux-headers ncurses-dev libpcap-dev libpcap libgcc libstdc++ \
&& rm -rf /var/cache/apk/* ./nethogs-0.8.1/
ENTRYPOINT [ "nethogs"]
CMD ["wlan0"]

Docker Pull Command

Comments (0)