I have developed an API using Docker on Windows. While running inside Visual Studio, I can access the URL without any issues. However, after stopping Visual Studio and deploying the application, the URL becomes unreachable when accessed through Docker. I switched Docker to Windows containers before starting it and am running Docker on Windows 11. The URL
https:
is accessible when running on Visual Studio, but not when accessed through Docker. Can anyone help me figure out this issue?
What I have tried:
below are the containers
I am able to access with URL 'https://localhost:59956/index.html' when running from vs when stopped vs debugging try to access from docker not bale to reach
PS C:\WINDOWS\system32> docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5573045eeade hongatewayapi:dev "C:\\remote_debugger\\…" About an hour ago Up 3 minutes 0.0.0.0:59957->8080/tcp, 0.0.0.0:59956->8081/tcp HON_GateWayAPI
992797fe4689 mongo:7.0 "mongod --bind_ip_all" 23 hours ago Up 3 minutes 0.0.0.0:27018->27017/tcp mongodb_new_v2
PS C:\WINDOWS\system32> docker port 5573045eeade
8080/tcp -> 0.0.0.0:59957
8081/tcp -> 0.0.0.0:59956
PS C:\WINDOWS\system32> docker port 992797fe4689
27017/tcp -> 0.0.0.0:27018