Skip to content

diegosc78/docker-systools

Repository files navigation

Docker Systools

Docker image with comprehensive system, network, and Kubernetes tools for troubleshooting, specially in Kubernetes clusters.

Version: 25.12.28 | Base: Ubuntu 24.04 LTS

Warning and disclaimer

  • This is not a secure image nor a small image, because it contains a lot of tools. This is only for troubleshooting. Use it if you know what you do.
  • The image is designed to be comprehensive rather than minimal - it's bigger but more useful for debugging
  • This is provided with no warranty at all.

Supported architectures

Based on ubuntu oficial image, so supported architectures of that image (including ARM64!). Simply build it for your architecture

What's inside

🌐 Network Tools

  • Network clients: ssh, telnet, socat, nc (netcat)
  • Network diagnostics: ping, traceroute, mtr, nmap, whois, nslookup/dig (dnsutils)
  • Network monitoring: iftop, tcpdump, tshark, tcptrack, iperf3
  • Network utilities: netstat, ss, ip, ifconfig (net-tools), ethtool
  • HTTP/HTTPS tools: curl, wget, lynx, mitmproxy

☸️ Kubernetes & Container Tools (INCLUDE_CONTAINERS_TOOLS)

  • kubectl: Kubernetes command-line tool
  • helm: Kubernetes package manager
  • k9s: Terminal UI for Kubernetes
  • dive: Tool for exploring Docker image layers
  • skopeo: Work with remote container images
  • ctop: Top-like interface for container metrics

💾 Database Clients (INCLUDE_DB_CLIENTS)

  • mysql: MySQL/MariaDB client
  • psql: PostgreSQL client
  • sqlite3: SQLite database client
  • redis-cli: Redis client

🔐 Security & SSL Tools

  • openssl: SSL/TLS toolkit
  • ssh: OpenSSH client

📝 Editors

  • nano: Easy-to-use terminal editor
  • vim: Advanced text editor

🔍 System & Debug Tools

  • htop: Interactive process viewer
  • lsof: List open files
  • strace: System call tracer
  • jq: JSON processor

🗂️ File & Compression Tools

  • zip/unzip: ZIP compression
  • gzip/bzip2: File compression utilities

🔄 Version Control (INCLUDE_CONTROL_VERSION)

  • git: Distributed version control
  • svn: Subversion client

Basic usage

  • Docker command line with host network:

    # docker run -it --rm --name docker-systools --net host ponte124/docker-systools bash

  • Docker command line with network capabilities:

    # docker run -it --rm --name docker-systools --cap-add=NET_ADMIN --cap-add=CAP_NET_RAW ponte124/docker-systools bash

  • Docker compose example: (first clone this repo)

    # docker-compose up -d # docker-compose exec docker-systools bash CONTAINER# nc -zv db 3306

  • Kubernetes (as deployment): (first clone this repo)

    # kubectl apply -f k8s-dksystools-deploy.yaml # kubectl exec -it docker-systools bash

Volumes and mounts

If you need operate with data you can mount any folder you need as a volume.

Short examples of some utilities

NOT YET DOCUMENTED (please, contribute with your own examples)

  • Test a port: Test if a port is open and listening

    CONTAINER# nc -zv <server> <port>

  • Top net traffic:

    CONTAINER# iftop -i <netinterface>

  • Top containers:

    `# docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock ponte124/docker-systools ctop

Building or customizing the image

First clone this repo. The Makefile includes variables you can customize to control which components are included:

Build Arguments

  • INCLUDE_CONTROL_VERSION=true: Include version control tools (git, svn)
  • INCLUDE_EXTRAS_NET=true: Include extra network tools (lynx, nmap, tcpdump, tshark, mitmproxy)
  • INCLUDE_DB_CLIENTS=true: Include database clients (mysql, postgresql, sqlite3, redis-cli)
  • INCLUDE_CONTAINERS_TOOLS=true: Include Kubernetes and container tools (kubectl, helm, k9s, dive, skopeo, ctop)
  • FINAL_CLEAN=true: Perform final APT cache cleaning (recommended for production)

Building

Full build (all tools):

make build

Minimal build (core tools only):

make build-minimal

Custom build (selective components):

# Example: Build without database clients
INCLUDE_DB_CLIENTS=false make build

# Example: Build with only core + K8s tools
INCLUDE_CONTROL_VERSION=false INCLUDE_DB_CLIENTS=false make build

Push to registry:

First customize the registry in Makefile (NS variable) and login to your registry:

make push

Additional Makefile Targets

  • make shell: Run container and open bash shell
  • make k8sdeploy: Deploy to Kubernetes
  • make uninstall: Remove from Kubernetes cluster

Contributions

Advices and contributions and forks and emails are welcome

Related work

Maybe you prefer using https://github.com/nicolaka/netshoot or https://github.com/Praqma/Network-MultiTool

Why I prefer my own image if these look better? Because it's based on ubuntu (I can do whatever I want, confortably)

About

Docker image with some system and network tools for troubleshooting, specially in kubernetes

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages