Docker Community Forums

Share and learn in the Docker community.

Network with 255.255.255.255 as subnet

You could use a 4th docker container to resolve this issue;
I’ve used haproxy as a resolution to this issue a number of times;
As HAProxy provides directing traffic to IP Address/port pairs dependent on dns address this may be ideal;
For instance MC1.<domain.com> would be directed to a single IP address.
This IP address would be your haproxy front end.
The HAProxy would then redirect this traffic to a private IP address and port, which could be assigned to your Minecraft servers.
e.g.
MC1.yourplace.com -> HAProxy
HAProxy redirects the packet to I.PA.DDR.ESS : xxxx
Docker redirects xxxx to a container AND maps it to 80/443
MC2.yourplace.com -> HAProxy

This solution takes advantage of external and internal port assignments with Docker, as well as an haproxy to diversify your dns addresses.
Hypothetically, if you have client software that can redirect to a port itself, haproxy may not be necessary provided you use the -p option with docker run;
docker run --name $MC-Server-# -p 1324:80
~This allows the Docker daemon to accept all traffic with port 1234 and pass it to the docker container as port 80