From 88d04616c2e08725109cae54918e700c7ffe45b7 Mon Sep 17 00:00:00 2001 From: SATISH KUMAR Date: Sat, 24 Jun 2017 06:04:05 -0500 Subject: [PATCH] Problem: On MacOsX, El-Capitan, the instructions on autopilotpattern/hello-world resulted in a page that displayed the following 404 Not Found nginx/1.10.1 404 Not Found nginx/1.10.1 Solution: Change the docker-compose.yml to version 3 of the file format. With this change, the output is Hello World which is the expected output. Why does this work?: This explanation is based on empirical evidence rather than any deep knowledge of the inner workings of docker-compose. version "3" of the docker-compose configuration seems to handle networks differently. As a consequence this seems to fix the dns issue. --- docker-compose.yml | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 954fa82..6654236 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,20 +1,22 @@ -nginx: - build: nginx/ - ports: - - "80:80" - links: - - consul:consul - restart: always -hello: - build: hello/ - links: - - consul:consul -world: - build: world/ - links: - - consul:consul -consul: - image: consul:latest - restart: always - ports: - - "8500:8500" +version: "3" +services: + nginx: + build: nginx/ + ports: + - "80:80" + links: + - consul:consul + restart: always + hello: + build: hello/ + links: + - consul:consul + world: + build: world/ + links: + - consul:consul + consul: + image: consul:latest + restart: always + ports: + - "8500:8500"