Docker beginner here.
I created a simple asp.net web application , which on run shows me the default page of application.
Using the docker build command, I create a image out of it and further using the docker run command docker run -d --name {containername} -p 81:8080 {imageid}
. Now when I try to access the container image over local host on browser i.e. http://localhost:81/, I am getting 'The site cannot be reached' error. I expected the same default page of application to open over the exposed port 81.
My docker client is windows/amd and docker server is linux/amd. The docker version I am using is 19.03.08
Using docker inspect I could see
"PortBindings": {
"8080/tcp": [
{
"HostIp": "",
"HostPort": "81"
}
]
},
and "IPAddress": "" in networksettings.
I would appreciate any help or suggestion.