Sign inSign up

tomclement/azure-debug-shell

By tomclement

•Updated 7 months ago

Lightweight image for debugging connectivity, DNS and service reachability inside Azure environments

Image
1

727

tomclement/azure-debug-shell repository overview

⁠azure-debug-shell

A lightweight Docker image for debugging connectivity, DNS, and service reachability inside Azure environments. Drop it into any Azure Container Instance, AKS pod, or App Service sidecar and get a full suite of network and database tooling instantly.

Build and Publish Docker Pulls

⁠Quick start

docker run --rm -it tomclement/azure-debug-shell sh

To keep the container running in the background and exec into it:

docker run -d --name debug tomclement/azure-debug-shell
docker exec -it debug sh

⁠Tools included

⁠Azure
ToolPurpose
azAzure CLI — authenticate, query resources, manage services
kubectlKubernetes CLI for AKS cluster debugging
⁠Network & Connectivity
ToolPurpose
curl / wgetHTTP/HTTPS request testing
dig / nslookup / hostDNS resolution (via bind-tools)
ping / arpingICMP connectivity checks
nc (netcat)Raw TCP/UDP port connectivity testing
nmapPort scanning
tracerouteHop-by-hop network path tracing
mtrCombined traceroute + ping for live path monitoring
tcpdumpPacket capture
ss / netstatSocket and connection inspection
ipInterface, route, and address management
opensslTLS handshake testing and certificate inspection
⁠Database Clients
ToolPurpose
psqlAzure Database for PostgreSQL / Flexible Server
mysqlAzure Database for MySQL / Flexible Server

Note: redis-cli is not included — the redis package is absent from the Azure Linux 3.0 repositories that back this image.

⁠Data Processing
ToolPurpose
jqJSON parsing — essential for az CLI output
yqYAML parsing
⁠Utilities
ToolPurpose
python3Ad-hoc scripting
gitClone scripts or configs on the fly
vim / nanoEdit files in-container
htopProcess monitoring
lsofOpen file and socket inspection
straceSystem call tracing
bashComfortable interactive shell
zip / unzipArchive handling

⁠Common Azure debugging scenarios

⁠Test private endpoint reachability
# DNS resolution
dig mypostgres.postgres.database.azure.com

# TCP port open?
nc -zv mypostgres.postgres.database.azure.com 5432

# Connect
psql "host=mypostgres.postgres.database.azure.com port=5432 dbname=mydb user=adminuser sslmode=require"
⁠Inspect TLS certificate on an endpoint
openssl s_client -connect myapp.azurewebsites.net:443 -servername myapp.azurewebsites.net </dev/null 2>/dev/null | openssl x509 -noout -dates -subject
⁠Check if a service bus / event hub hostname resolves to a private IP
dig mynamespace.servicebus.windows.net
# Expect a 10.x.x.x address if Private Link is correctly configured
⁠Trace routing to an Azure resource
mtr --report myaccount.blob.core.windows.net
⁠Query Azure metadata from inside a VM or container
curl -s -H "Metadata: true" \
  "http://169.254.169.254/metadata/instance?api-version=2021-02-01" | jq .
⁠AKS — inspect pods across namespaces
az aks get-credentials --resource-group my-rg --name my-cluster
kubectl get pods -A
kubectl describe pod <pod-name> -n <namespace>

⁠Running in Azure

⁠Azure Container Instances (one-liner)
az container create \
  --resource-group my-rg \
  --name debug-shell \
  --image tomclement/azure-debug-shell \
  --os-type Linux \
  --vnet my-vnet \
  --subnet my-subnet

az container exec --resource-group my-rg --name debug-shell --exec-command sh
⁠AKS — ephemeral debug pod
kubectl run debug-shell \
  --image=tomclement/azure-debug-shell \
  --restart=Never \
  --rm -it \
  -- sh
⁠AKS — inject as a sidecar
containers:
  - name: debug
    image: tomclement/azure-debug-shell
    # Remove in production — for temporary troubleshooting only

⁠Building locally

docker build -t azure-debug-shell .

# Multi-platform
docker buildx build --platform linux/amd64,linux/arm64 -t azure-debug-shell .

⁠License

MIT⁠

Tag summary

Content type

Image

Digest

sha256:0c788a293…

Size

287.5 MB

Last updated

7 months ago

docker pull tomclement/azure-debug-shell