Mirroring traffic to another container

Hi guys,

Hope you can help here,

Assume I have container A with IP that gets some TCP/UDP traffic on port 3000.

Now assume I have another container, B, with IP that listens on port 4000.

I’d like B to set as a tap for container A (able to monitor all of the traffic that A gets)

In other words, I’d like to mirror every traffic that A gets (whether it come from outside or from another container), into container B.

Is there a docker command for this?