small docker image for nethogs (less than 7 Mb)
10K+
clean according to trivy on the 23/11/2019
2019-11-23T20:04:47.393+0100 INFO Detecting Alpine vulnerabilities...
Total: 0 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 0)
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 nethogs will monitor wlan0 and 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
MAINTAINER k3ck3c [email protected]
RUN apk update && apk add wget
&& wget --no-check-certificate -c http://github.com/raboof/nethogs/archive/v0.8.1.tar.gz
&& 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 http://nl.alpinelinux.org/alpine/edge/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"]
Content type
Image
Digest
Size
6.8 MB
Last updated
almost 7 years ago
docker pull k3ck3c/nethogs