Docker Connection refused in localhost Window 10

Solution for Docker Connection refused in localhost Window 10
is Given Below:

In my Asp.Net core the localhost API run when I debugger
enter image description here

But when I publish in Docker. It’s not working.

My container :

8ec8f59e7dde   04055a34c670   "dotnet ProductServi…"   8 minutes ago   Up 2 minutes   0.0.0.0:9999->9999/tcp, :::9999->9999/tcp   interesting_mayer

"Kestrel": {
"Endpoints": {
  "Http": {"Url": "http://localhost:9999"}
}

}

Docker information :
enter image description here
enter image description here

And here I use Window 10.

Thank you very much

Lamnv,

It seems your docker is not configured correctly, you can fir more information regarding how to configure docker in this PowerShell example.