I have a Docker host that should allow each container to have multiple static IP addresses. The application inside the container should then be able to choose from which address
Every docker container has a single IP only. We can set custom IP also, by making a bridge network as,
docker network create net1 --driver=bridge --subnet="192.168.0.1/27"
If you don't mention the driver then by default it is bridge network.
So here using --subnet, you can give a custom IP address to the network and using that network, you can also give custom IP addresses to the containers which are inside that network.
Then run a container as,
docker run -it --network=net1 --ip="192.168.0.3" --name=MyContainer image_name
Now, in this way you can make 32-27=5 i.e., (2^5)-2 docker containers.
I think you can do it by customizing docker0 bridge, or even create your own network bridge