First, let me apologize from being obnoxious in this reply, but I am tired of reading people saying that it can be done but no one respond when I ask for a “how to”…
It would be great if you could describe your process to make it work in Windows. I mean, create a custom network, build and attach containers to the custom network and access the containers from the host machine using their custom static IP addresses issued by you. Also important is to have the containers able to access and mount volumes in the host machine. Everything must work seemingly.
To be more specific: No port restriction or requirement! What I mean with that is: I want to have several containers with specific server configuration running LAMP Stack. All the containers will mount a volume that will point their “/var/www/html/” to the folder in the host machine where the source code is located at (yes, all containers will see and serve the same files). As each container has its own IP address, the port mapping should not (and cannot be) an issue or a requirement, which means I should be able to simply open my browser in the host and access the IP address of the container and the page referent to my source code will show.
Each container should also be able to access each other as if they were real machines. So, my LAMP stack servers should be able to see and access my MySQL Server (another container), and, if I need, the NodeJS Server (another container) and any other server in the same network or in a network where my NAT is configured to allow communication.
I can do it on Linux, no problem. It is actually fun to have it all set over a Linux Host. In Windows hosts, however, nothing works and a lot of stuff is blocked or reverted after boot. Under Windows, the communication among container and the host machine is stuck and limited to port mapping (which prevents me, among several things, from using the hosts’ file of the host machine to point a domain to each container).
Notwithstanding, mounting the volume in Windows has been a hell issue until the last update when it appears the problem was “resolved” (despite, time after time, the volume gets disconnected for no reason and you have to reboot the container).
The obnoxious part is that I honestly doubt you will be able to pull this trick and teach the world how to do that.
Even if I ask you to teach us how to work around this limitation by simply mounting the host folder from inside the container using CIFS (Samba), I am sure you would fail on that too, despite it is not an impossible task as the previous request.
Feel free to reply rubbering a functional solution to my face… I will actually be happy if it happens! On the other hand, when you exhaust your knowledge trying to do it (yeah, it is possible, but it is a pain in the neck to make it right), feel free to ask for a “how to” mount the Samba from inside the container so you can see the answer os about to dismantle things that Docker put there to prevent it from being done (which is the main reason I am pissed with the Docker Development Team, because they are the ones makeing it NOT work!!!).