How to host multiple websites (with different IP’s) in IIS Container

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= --ip= microsoft/nanoserver powershell

Please let me know.

From the container add a secondary IP address using powershell with the cmdlets below:
New-NetIPAddress –InterfaceIndex 2 –IPAddress -PrefixLength 24 -DefaultGateway

You can use the article below (works on Nano Server and Server core)