对nginx的curl请求:拒绝alpine docker映像Recv失败:对等方重置连接

对nginx的curl请求:拒绝alpine docker映像Recv失败:对等方重置连接,docker,Docker,我正在尝试调试为什么我发送到docker容器的curl请求在我的Ubuntu20.04机器上被拒绝。我正在运行股票nginx:alpine图像 chris@chris-Precision-7920-Tower  ~  docker images

我正在尝试调试为什么我发送到docker容器的curl请求在我的Ubuntu20.04机器上被拒绝。我正在运行股票
nginx:alpine
图像

chris@chris-Precision-7920-Tower  ~  docker images                                                                                                                               
nginx          alpine                  629df02b47c8   2 months ago    22.3MB
hello-world    latest                  bf756fb1ae65   13 months ago   13.3kB
openjdk        8-jdk-alpine            a3562aa0b991   21 months ago   105MB
 chris@chris-Precision-7920-Tower  ~  docker run  -p 8081:80 nginx:alpine                                                                                                           ✔  5437  08:20:32
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
然后我尝试向容器发送一个请求

curl http://0.0.0.0:8081/
curl: (56) Recv failure: Connection reset by peer
我曾在更复杂的图像/容器上遇到过这种情况,但这似乎是一个最小的可复制示例。通过更复杂的示例,我确保绑定到容器内部的
0.0.0.0
,而不是
127.0.0.1
/
localhost

docker版本

chris@chris-Precision-7920-Tower  ~  docker --version                        ✔  5447  08:39:08
Docker version 20.10.3, build 48d30b5
 chris@chris-Precision-7920-Tower  ~  dockerd --version                       ✔  5449  08:46:24
Docker version 20.10.3, build 46229ca
对于未来有这个问题的傻瓜(比如我),这是由我的VPN造成的

一旦我的VPN关闭,一切正常