我的系统是带有 WSL2 的 Win10,我运行了一个 dockergogs
容器(来自 WSL 中的 ubuntu):
83b2a8833235 gogs/gogs "/app/gogs/docker/st…" 17 minutes ago Up 17 minutes 0.0.0.0:10022->22/tcp, :::10022->22/tcp, 0.0.0.0:10080->3000/tcp, :::10080->3000/tcp gogs
Run Code Online (Sandbox Code Playgroud)
我发现我可以卷曲它,但不能使用浏览器访问它:
>curl -vvv http://localhost:10080
* Rebuilt URL to: http://localhost:10080/
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 10080 (#0)
> GET / HTTP/1.1
> Host: localhost:10080
> User-Agent: curl/7.55.1
> Accept: */*
>
< HTTP/1.1 302 Found
< Content-Type: text/html; charset=utf-8
< Location: /install
< Set-Cookie: lang=en-US; Path=/; Max-Age=2147483647
< Set-Cookie: i_like_gogs=64602dcbf733a9e0; …
Run Code Online (Sandbox Code Playgroud)