Localhost重定向到localhost/tutorial

问题描述:

Y!

安装Docker Desktop后,本地主机出现问题.它会自动重定向到localhost/tutorial.我认为这是针对初学者"的.Docker桌面随附的容器,但是即使将其删除并运行其他容器,或者即使docker已完全关闭,它仍会自动重定向,这使我相信问题出在Windows.

I am having an issue with my localhost after installing Docker Desktop. It automatically redirects to localhost/tutorial. I believe that is for the "beginner" container that comes with docker desktop, however even after removing it, and having other containers running, or even if docker is completely turned off, it still automatically redirects, which leads me to believe the issue is something with Windows.

我已经在Windows上检查了主机文件,找不到任何错误,但万一我失明了,这是主机文件:

I've checked my hosts file on windows and can't find anything wrong, but in case im being blind, this is the hosts file:

#
127.0.0.1 localhost
::1 localhost
# Added by Docker Desktop
192.168.68.116 host.docker.internal
192.168.68.116 gateway.docker.internal
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section

感谢您的帮助!

因此,事实证明确实不是Windows,而是缓存了重定向的Google Chrome.因此,您应该做的是进入chrome设置并清理缓存,这样就可以解决问题.

So turns out that it was indeed not windows, rather it was Google Chrome that had cached the redirect. So what you should do is go into the chrome settings and clean your cache, and that should resolve the issue.