See docker-playground.gir for Dockerfiles of all osmocom network elements. It is how our CI works.
However, with all the 3GPP protocols there is none that you can speak through nat or even only with dynamic IPs.
So the only way is to use docker network with static IPs for each container.