Docker for windows - Can't connect to default iis site -


i have windows container running microsoft/iis base image.

i built image using following:

command:

docker build -t test-iis-image . 

file:

from microsoft/iis

expose 8080'

i run container using:

command:

docker run -d -p 8080:8080 test-iis-image 

i got ip address of container (e.g. 172.18.167.181)

added route:

command

route /p add 172.0.0.0 mask 255.0.0.0 10.0.75.1 

and tried connect container using following url:

http://172.18.167.181:8080/ 

i expecting see default iis web page, is:

the following error encountered while trying retrieve url: > > > http://172.18.167.181:8080/

connection 172.18.167.181 failed.

the system returned: (110) connection timed out

the remote host or network may down. please try request again.

however, when ping ip address seems find container:

ping 172.18.167.181 

pinging 172.18.167.181 32 bytes of data:

reply 172.18.167.181: bytes=32 time<1ms ttl=128

reply 172.18.167.181: bytes=32 time<1ms ttl=128

reply 172.18.167.181: bytes=32 time=1ms ttl=128

reply 172.18.167.181: bytes=32 time<1ms ttl=128

ping statistics 172.18.167.181:

packets: sent = 4, received = 4, lost = 0 (0% loss), approximate round trip times in milli-seconds:

minimum = 0ms, maximum = 1ms, average = 0ms

i think not working because default port inside container not 8080. it's 80. change

docker run -d -p 8080:8080 test-iis-image 

to

docker run -d -p 8080:80 test-iis-image 

for more details refer https://hub.docker.com/r/microsoft/iis/

also can view main dockerfile here

https://github.com/microsoft/iis-docker/blob/master/windowsservercore/dockerfile


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -