Docker image with tools to check networking
  • Dockerfile 100%
Find a file
Rodolfo Pilas a077a3eb24
All checks were successful
Build and Publish Docker Image / docker (push) Successful in 1m8s
ci: avoid publish on PR; add network tools and README recipes
2026-03-14 16:08:07 -03:00
.forgejo/workflows ci: avoid publish on PR; add network tools and README recipes 2026-03-14 16:08:07 -03:00
.gitignore first commit 2021-06-02 19:53:05 -03:00
Dockerfile ci: avoid publish on PR; add network tools and README recipes 2026-03-14 16:08:07 -03:00
LICENSE add LICENSE doc 2026-02-26 21:26:38 -03:00
README.md ci: avoid publish on PR; add network tools and README recipes 2026-03-14 16:08:07 -03:00

docker-net-tools

This image provides a lightweight Alpine Linux toolbox with networking and diagnostics utilities. Its goal is to run troubleshooting tools from a container, without installing them on your host.

Usage

Open a shell in the container

docker pull git.rwy.pub/pilasguru/docker-net-tools:latest
docker run -it --rm git.rwy.pub/pilasguru/docker-net-tools

Run a single command

docker run -it --rm git.rwy.pub/pilasguru/docker-net-tools ping 1.1.1.1
docker run -it --rm git.rwy.pub/pilasguru/docker-net-tools mtr 1.1.1.1
docker run -it --rm git.rwy.pub/pilasguru/docker-net-tools nmap -Pn 192.168.1.1

Run commands against host files

docker run -it --rm -v /etc:/mnt git.rwy.pub/pilasguru/docker-net-tools rg debian /mnt

Installed tools (main commands)

  • DNS: dig, nslookup, host
  • Connectivity and HTTP: ping, curl, nc
  • Routing and interfaces: ip, ifconfig, route, netstat, arp
  • Path and reachability: mtr, traceroute
  • Discovery and scanning: nmap
  • Packet capture: tcpdump
  • Crypto/TLS: openssl
  • Data/text helpers: jq, bat, fd, rg
  • Certificates store: ca-certificates

Recipes

1) DNS lookup

docker run --rm git.rwy.pub/pilasguru/docker-net-tools dig +short example.com
docker run --rm git.rwy.pub/pilasguru/docker-net-tools nslookup example.com

2) HTTP connectivity test

docker run --rm git.rwy.pub/pilasguru/docker-net-tools curl -I https://example.com

3) TCP port check

docker run --rm git.rwy.pub/pilasguru/docker-net-tools nc -vz example.com 443

4) Trace network path

docker run --rm git.rwy.pub/pilasguru/docker-net-tools traceroute 1.1.1.1
docker run --rm git.rwy.pub/pilasguru/docker-net-tools mtr --report --report-cycles 10 1.1.1.1

5) Quick host scan

docker run --rm git.rwy.pub/pilasguru/docker-net-tools nmap -sV -Pn 192.168.1.1

6) Inspect interfaces and routes

docker run --rm git.rwy.pub/pilasguru/docker-net-tools ip a
docker run --rm git.rwy.pub/pilasguru/docker-net-tools ip route

7) Capture packets to a file

docker run --rm -v "$PWD":/work git.rwy.pub/pilasguru/docker-net-tools \
  tcpdump -i any -w /work/capture.pcap

8) Parse JSON output

docker run --rm git.rwy.pub/pilasguru/docker-net-tools \
  sh -lc "curl -s https://ipinfo.io/json | jq ."

License

Licensed under the WTFPL v2.

http://www.wtfpl.net/

WTFPL badge