Use Docker Container as Gateway for another Container

Hey folks,

already searched the net but Im a bit confused about using a container as gateway.
I have an image from docker hub running on a pi 4 that provides http https socks5 proxy with routing traffic through a vpn. I use it for my other lan devices to provide them a vpn tunnnel.
Now Im planning to build a new container with raspbian image as base and I want this container to use the “vpn container” as a gateway.
What would be the way to achieve this? Realized that in the raspbian image/container there is no network interface to configure oO. Or could it be done with docker network settings?

Basically what you want to do is create a docker network and join both of your containers to it.
Then they will have an interface with which they can communicate

Thx for your reply.
So I create a new bridged network and tell both containers to use this as interface?
But I want to route all traffic from container B through container A.
Could you explain a bit more in depth please?
Also wondering why the raspbian container has no iface…