I am running docker on windows server 2016 and need to spin an IIS Container that can host multiple websites with different IP’s. How can i do that.
Hi There,
You can create a Transparent network on your Docker Host and assign an IP address to your Container, read more below.
On IIS you would configure your sites as you would on a normal Windows Server.
Thanks for your response, i created a transparent network and tried to run new containers using below command, but it binded only one IP (.3)
Command i am using
docker run -it --network=MyTransparentNet --ip=172.31.2.2 --ip=172.31.2.3 microsoft/nanoserver powershell
Please let me know.
From the container add a secondary IP address using powershell with the cmdlets below:
Get-NetAdapter
New-NetIPAddress –InterfaceIndex 2 –IPAddress 192.168.0.26 -PrefixLength 24 -DefaultGateway 192.168.0.1
You can use the article below (works on Nano Server and Server core)