'Cannot catch packets in docker container with tcpdump
Recently I was encounter an issue with packets lost and we were trying to catch packets inside container. Application is running on docker swarm as a service on port 3000.
After tcpdump installation, I was able to run the command but I find out I am not able to catch packets inside the container with destination port 3000 - port of the app.
tcpdump port 3000
I found the blog from Akita that describe how to connect to the container network (I used nicolaka/netshoot image). When I tested it locally with docker container (not services) it works but in swarm it did not. I was able to catch other packets, e.g. to PG database.
Can somebody explain why it does not work? Does the network on swarm containers deployed as a service works differently?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
