docker nginx连接拒绝连接到php fpm

我是新来的docker,我已经创build了一些容器的Web服务。所有的容器运行良好,但Nginx的容器无法访问的phpfpm容器。我检查了configuration文件,但什么也没有发现,这可能是networking问题,我有search了很多网站,似乎没有必要通过docker集装箱打开防火墙。所以,这是非常奇怪的,请帮助!

nginx的error.log

2017/12/01 08:09:24 [error] 6#6:* 4连接()失败(111:连接被拒绝)连接上游时,客户端:172.18.0.1,服务器:localhost,请求:“GET / index .php HTTP / 1.1“,上行:”fastcgi://172.18.0.4:9000“,主机:”localhost:81“

泊坞窗,compose.yml

在这里输入图像说明

nginx vhost.conf

location ~ \.php$ { fastcgi_pass phpfpm:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; }