I have a containerised application that runs on a fairly customised network setup on an embedded platform. The container expects to manage IP networking on one of its interfaces and runs a dnsmasq instance internally to answer DHCP and DNS requests and sets up routing between that interface and another one.
I’d like to test this away from the embedded platform where I can’t run the customised docker environment. I’d like to run it up in a docker-compose stack with a compose network defined for the interface the container should be managing. But I can’t for the life of me figure out how to stop docker from doing IPAM on that network. All it needs to do is to create a network and attach containers to it with no IPAM but docker insists on allocating IP addresses to the interfaces inside the container.
I’ve even gone and implemented a custom network driver plugin that creates the veth pairs and doesn’t assign any IP addresses but docker/libnetwork still assigns the IP addresses.
Is there any way of doing what I want here using the built-in facilities of docker compose? Or am I stuck using something like pipework to configure the networking once the stack is up?