Docker Community Forums

Share and learn in the Docker community.

How to Monitor traffic between docker containers with a proxy?


(Neokil) #1

Hey guys,

I am currently setting up a docker environment for our developer-team. The Project consists of multiple micro-services, an sql-database and a nodejs-hosted frontend-application. So far no problem of setting up the containers and an isolated network in a docker-compose-file.
Now I talked to the developers and they need to monitor the traffic between the services and between the services and the frontend for debugging. They are using mitmproxy for that. Now I saw there is an official image for that, but do I have to configure this in every container by itself or maybe it is possible to configure the docker-network to route all traffic through the proxy-container?
When I had a quick search I found only solutions which modified the iptables of the host, but this will not be possible since we are running on multiple platforms and dont want to mess with the system outside of the containers.
Has anyone set up something like this already or has an idea how this might work?

Greetings
Neokil