I'd love to figure out how to use Mitmproxy to intercept traffic from Docker containers for debugging on macOS, I've never been able to make it work.
I usually use a container specifically for MITMProxy rather than install it alongside whatever I'm troubleshooting.
It was pretty straightforward. I don't recall having to do anything tricky to make it work.