I also had this error using docker for windows.
Despite numerous attempts it wasnt resolved by playing with the port numbers and image rebuilds, or complete wipe of the docker container.
It took me a while to resolve so want to save you all some time.
1- enter the command Run docker network ls
Look for output similar to the below-
Network ID Name Driver Scope
cd6a217449e3 nat nat local
2- Copy the network ID
3-enter the command docker network inspect THENETWORKID
4- You will receive some outpuut to screen which looks like a json output, look for text similar to the below:-
"Containers": {
"4b953b6a597e38eac1de39119d30fb4c87bca6faae7da444b02e223685eed5c7": {
"Name": "jolly_rosalind",
"EndpointID": "5919da54af323505e18d9807742fd12bb3acbe260dcee28911ffdf56fb905baf",
"MacAddress": "00:15:5d:3c:50:58",
"IPv4Address": "172.30.49.218/16",
"IPv6Address": ""
}
5- enter 'http://THEIPV4ADDRESS:5000/' in your web browser, and you may be presnted with a beautiful '0'.
Good Luck!