A Simple Docker Image for Packet Captures


A simple Alpine Linux based Docker image with tcpdump for network troubleshooting and testing

Run the Docker Image and Show the tcpdump Options

docker run -it --rm slashdoom/tcpdump --help

Usage

Packet capture another container to stdout:

$ docker run -it --net container:[container name or ID]  slashdoom/tcpdump [TCPDUMP OPTIONS]

Packet capture another container to file:

$ docker run -it -v $PWD:/pcap --net container:[container name or ID]  slashdoom/tcpdump -w /pcap/capture.pcap [TCPDUMP OPTIONS]
D C o o c n k t e a r i n A e p r p C t o I c n n p t t d a f u i m n p e r U s e r T r a f f i c