├── .github └── README.md └── Dockerfile /.github/README.md: -------------------------------------------------------------------------------- 1 |

🐋 Docker TCPDump

2 |

3 | Small Docker container to sniff the traffic of any other Docker container with tcpdump 4 |
5 | lissy93/tcpdump 6 |

7 | 8 | --- 9 | 10 | ### Usage 11 | 12 | ``` 13 | docker run --rm -v $(pwd):/dump --tty --net=container: lissy93/tcpdump tcpdump -i any -w /dump/dump.pcap 14 | ``` 15 | 16 | Where `` is the running container you would like to analyze, and `dump.pcap` is the output filename. 17 | 18 | Once you've finished captureing traffic, open the pcap file in [Wireshark](https://www.wireshark.org/), or your favorite packet analyzer. 19 | 20 | You can also append any other [`tcpdump`](https://www.tcpdump.org/) commands with `docker run lissy93/tcpdump tcpdump [commands]`. 21 | 22 | The container is published on DockerHub under [lissy93/tcpdump](https://hub.docker.com/r/lissy93/tcpdump), 23 | or build and run the [Dockerfile](https://github.com/Lissy93/docker-tcpdump/blob/main/Dockerfile) yourself. 24 | 25 | --- 26 | 27 |

28 | © Alicia Sykes 2022
29 | Licensed under MIT
30 | 31 |

32 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:latest 2 | RUN apk add --no-cache tcpdump 3 | CMD tcpdump -i any 4 | --------------------------------------------------------------------------------