Docker 502在浏览器中查看时出现错误的网关

我只是刚刚开始与docker工人,并试图build立一个简单的Magento环境如下所述,但是在完成自述文件中描述的安装步骤之后,我尝试通过导航到http://在浏览器中查看Magento安装。 0.0.0.0:32781/ ,但只是收到“502坏的网关nginx …”。

在运行docker ps ,我收到以下内容:

 41726c7b6e4b meanbee/magento2-varnish:latest "/bin/sh -c /start.sh" 27 hours ago Up 5 seconds 0.0.0.0:32782->80/tcp dockermagento2_varnish_1 5c543aa89500 meanbee/magento2-nginx:1.9 "/usr/local/bin/do..." 27 hours ago Up 5 seconds 443/tcp, 0.0.0.0:32781->80/tcp dockermagento2_web_1 55ddcc9865c4 meanbee/magento2-php:7.0-cli "/docker-entrypoin..." 27 hours ago Up 4 seconds dockermagento2_cron_1 23b9eccd971c mariadb:10 "docker-entrypoint..." 27 hours ago Up 7 seconds 0.0.0.0:32779->3306/tcp dockermagento2_db_1 

我在这里错过了一步吗? 我个人发现docker文件有点棘手开始!

Docker日志为5c543aa89500

 172.20.0.1 - - [11/Oct/2017:11:13:13 +0000] "GET / HTTP/1.1" 404 571 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "-" 172.20.0.1 - - [11/Oct/2017:11:13:14 +0000] "GET /favicon.ico HTTP/1.1" 404 571 "http://localhost:32773/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "-" 172.20.0.1 - - [11/Oct/2017:11:24:58 +0000] "GET / HTTP/1.1" 404 571 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "-" nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful 172.20.0.1 - - [12/Oct/2017:09:36:56 +0000] "GET / HTTP/1.1" 404 571 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "-" 172.20.0.1 - - [12/Oct/2017:09:36:56 +0000] "GET /favicon.ico HTTP/1.1" 404 571 "http://0.0.0.0:32771/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "-" 172.20.0.1 - - [12/Oct/2017:09:47:42 +0000] "GET / HTTP/1.1" 404 571 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "-" 172.20.0.1 - - [12/Oct/2017:09:50:06 +0000] "GET /magento HTTP/1.1" 404 571 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "-" nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful 2017/10/12 12:38:01 [error] 13#13: *1 connect() failed (113: No route to host) while connecting to upstream, client: 172.20.0.6, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://172.20.0.5:9000", host: "0.0.0.0:32775" 172.20.0.6 - - [12/Oct/2017:12:38:01 +0000] "GET / HTTP/1.1" 502 575 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "172.20.0.1" 2017/10/12 12:38:04 [error] 13#13: *1 connect() failed (113: No route to host) while connecting to upstream, client: 172.20.0.6, server: localhost, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://172.20.0.5:9000", host: "0.0.0.0:32775", referrer: "http://0.0.0.0:32775/" 172.20.0.6 - - [12/Oct/2017:12:38:04 +0000] "GET /favicon.ico HTTP/1.1" 502 575 "http://0.0.0.0:32775/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "172.20.0.1" 2017/10/12 12:40:42 [error] 13#13: *4 connect() failed (113: No route to host) while connecting to upstream, client: 172.20.0.6, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://172.20.0.5:9000", host: "0.0.0.0:32775" 172.20.0.6 - - [12/Oct/2017:12:40:42 +0000] "GET / HTTP/1.1" 502 575 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "172.20.0.1" 2017/10/12 12:40:46 [error] 13#13: *4 connect() failed (113: No route to host) while connecting to upstream, client: 172.20.0.6, server: localhost, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://172.20.0.5:9000", host: "0.0.0.0:32775", referrer: "http://0.0.0.0:32775/" 172.20.0.6 - - [12/Oct/2017:12:40:46 +0000] "GET /favicon.ico HTTP/1.1" 502 575 "http://0.0.0.0:32775/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "172.20.0.1" 2017/10/12 12:40:58 [error] 13#13: *4 connect() failed (113: No route to host) while connecting to upstream, client: 172.20.0.6, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://172.20.0.5:9000", host: "0.0.0.0:32775" 172.20.0.6 - - [12/Oct/2017:12:40:58 +0000] "GET / HTTP/1.1" 502 575 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "172.20.0.1" 2017/10/12 12:41:01 [error] 13#13: *4 connect() failed (113: No route to host) while connecting to upstream, client: 172.20.0.6, server: localhost, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://172.20.0.5:9000", host: "0.0.0.0:32775", referrer: "http://0.0.0.0:32775/" 172.20.0.6 - - [12/Oct/2017:12:41:01 +0000] "GET /favicon.ico HTTP/1.1" 502 575 "http://0.0.0.0:32775/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "172.20.0.1" nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful 2017/10/12 13:32:09 [error] 13#13: *1 connect() failed (113: No route to host) while connecting to upstream, client: 172.20.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://172.20.0.5:9000", host: "0.0.0.0:32781" 172.20.0.1 - - [12/Oct/2017:13:32:09 +0000] "GET / HTTP/1.1" 502 575 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "-" 2017/10/12 13:32:12 [error] 13#13: *1 connect() failed (113: No route to host) while connecting to upstream, client: 172.20.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://172.20.0.5:9000", host: "0.0.0.0:32781", referrer: "http://0.0.0.0:32781/" 172.20.0.1 - - [12/Oct/2017:13:32:12 +0000] "GET /favicon.ico HTTP/1.1" 502 575 "http://0.0.0.0:32781/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "-"