Skip to content

Instantly share code, notes, and snippets.

@mike-weiner
Created September 10, 2024 00:28
Show Gist options
  • Save mike-weiner/2e675a98bdedc070f9e4b9e681fb5309 to your computer and use it in GitHub Desktop.
Save mike-weiner/2e675a98bdedc070f9e4b9e681fb5309 to your computer and use it in GitHub Desktop.
A Docker container image that can be used to conduct network troubleshooting and debugging.
# Useage:
# 1. Build Image: docker build -t network-debug -f Dockerfile.network-debug .
# 1a. Ensure Image is Built: docker images
# 2. Create Container from Image: docker run -d network-debug
# 3. Exec into Container: docker exe -it <containerID> bash
# 4. Stop Container After Usage: docker stop <containerID>
FROM alpine:latest
RUN apk upgrade --allow-untrusted && \
apk add bash iptables nmap-ncat curl bind-tools mtr tcpdump iputils net-tools openssh iperf3 --allow-untrusted && \
apk update --allow-untrusted
# "tools" directory could contain additional custom scripts as needed for debugging to be placed somehwere in the image's PATH
# ADD ./tools/ /usr/local/bin/
CMD ["sleep", "infinity"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment