After working absolutely fine for at least a month, I am no longer able to access docker containers over localhost.
To reproduce:
- Confirm nothing is running on port 80; both http://localhost and http://127.0.0.1 return Connection Refused
- Open command prompt and run
docker run -dp 80:80 docker/getting-started - http://localhost is still returns connection refused, but http://127.0.0.1 now redirects to http://127.0.0.1/tutorial/ and shows the docker tutorial page
I'm at a loss with how to fix this. The answers on here all seem to resolve with the configuration in docker-compose or docker run being wrong, or is some complex problem involving cross-container communication.
I have already tried system prune --all --volumes --force and there are no changes in the hosts file.
Some version numbers:
Windows 11: 22000.675
Docker Desktop: 4.8.2 (79419)
Engine: 20.10.14