centos 7.2 + docker 19.3 docker nginx 报错:curl: (56) Recv failure: Connection reset by peer

centos 7.2 + docker 19.3  docker nginx 报错:docker run -d -p 80:80 --name nginx nginx
[root@aliyundocker ~]# curl 127.0.0.1
curl: (56) Recv failure: Connection reset by peer
解决办法:切换docker 网络:添加参数:--net="host",如下:

[root@aliyundocker ~]# docker network ls
NETWORK ID          NAME                DRIVER              SCOPE
598e1b7619fd        bridge              bridge              local
ce9495156b76        host                host                local
067fdbcd4531        none                null                local

docker run -d --net="host" -p 80:80 --name nginx nginx
 

你可能感兴趣的:(centos 7.2 + docker 19.3 docker nginx 报错:curl: (56) Recv failure: Connection reset by peer)