{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/2816","repository_url":"https://api.github.com/repos/docker/compose","labels_url":"https://api.github.com/repos/docker/compose/issues/2816/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/2816/comments","events_url":"https://api.github.com/repos/docker/compose/issues/2816/events","html_url":"https://github.com/docker/compose/issues/2816","id":131193240,"number":2816,"title":"Very misleading error messaging from typo in yaml file.","user":{"login":"endophage","id":1302091,"avatar_url":"https://avatars.githubusercontent.com/u/1302091?v=3","gravatar_id":"","url":"https://api.github.com/users/endophage","html_url":"https://github.com/endophage","followers_url":"https://api.github.com/users/endophage/followers","following_url":"https://api.github.com/users/endophage/following{/other_user}","gists_url":"https://api.github.com/users/endophage/gists{/gist_id}","starred_url":"https://api.github.com/users/endophage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endophage/subscriptions","organizations_url":"https://api.github.com/users/endophage/orgs","repos_url":"https://api.github.com/users/endophage/repos","events_url":"https://api.github.com/users/endophage/events{/privacy}","received_events_url":"https://api.github.com/users/endophage/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/compose/labels/area/config","name":"area/config","color":"c7def8"},{"url":"https://api.github.com/repos/docker/compose/labels/kind/bug","name":"kind/bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/docker/compose/milestones/16","html_url":"https://github.com/docker/compose/milestones/1.6.1","labels_url":"https://api.github.com/repos/docker/compose/milestones/16/labels","id":1561731,"number":16,"title":"1.6.1","description":"","creator":{"login":"dnephin","id":442180,"avatar_url":"https://avatars.githubusercontent.com/u/442180?v=3","gravatar_id":"","url":"https://api.github.com/users/dnephin","html_url":"https://github.com/dnephin","followers_url":"https://api.github.com/users/dnephin/followers","following_url":"https://api.github.com/users/dnephin/following{/other_user}","gists_url":"https://api.github.com/users/dnephin/gists{/gist_id}","starred_url":"https://api.github.com/users/dnephin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnephin/subscriptions","organizations_url":"https://api.github.com/users/dnephin/orgs","repos_url":"https://api.github.com/users/dnephin/repos","events_url":"https://api.github.com/users/dnephin/events{/privacy}","received_events_url":"https://api.github.com/users/dnephin/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2016-02-03T19:08:50Z","updated_at":"2016-02-04T00:02:35Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-02-03T23:53:49Z","updated_at":"2016-02-04T00:04:20Z","closed_at":null,"body":"So I had an errant `-` in my compose yaml file, and it manifested itself during `docker-compose build` as the following error:\r\n\r\n```\r\nCouldn't connect to Docker daemon at http+docker://localunixsocket - is it running?\r\n\r\nIf it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.\r\n```\r\nThe yml file was bad in the below format (the service name was prefixed with the `-`):\r\n```\r\n-test:\r\n    build: .\r\n    dockerfile: Dockerfile\r\n```\r\nThe error docker is returning (dug it out of journalctl) is:\r\n```\r\nFeb 03 15:51:05 endophage docker[593]: time=\"2016-02-03T15:51:05.252721921-08:00\" level=info msg=\"POST /v1.19/build?pull=False&nocache=False&q=False&t=david_-test&forcerm=False&rm=True&dockerfile=server.Dockerfile\"\r\nFeb 03 15:51:05 endophage docker[593]: time=\"2016-02-03T15:51:05.252859421-08:00\" level=error msg=\"Handler for POST /v1.19/build returned error: repository name component must match \\\"[a-z0-9](?:-*[a-z0-9])*(?:[._][a-z0-9](?:-*[a-z0-9])*)*\\\"\"\r\nFeb 03 15:51:05 endophage docker[593]: time=\"2016-02-03T15:51:05.252878753-08:00\" level=error msg=\"HTTP Error\" err=\"repository name component must match \\\"[a-z0-9](?:-*[a-z0-9])*(?:[._][a-z0-9](?:-*[a-z0-9])*)*\\\"\" statusCode=500\r\n```\r\n\r\nMy error in the yaml file is obvious now I've seen it but the error message is very unintuitive and I assume this isn't the only case in which docker returns a reasonable (if technical) error message and compose returns something more obscure.\r\n\r\nFYI, when trying to build a similarly badly named thing on docker itself, it returns the expected error:\r\n```\r\n15:52 $ docker build -t -test .\r\n[sudo] password for david: \r\nrepository name component must match \"[a-z0-9](?:-*[a-z0-9])*(?:[._][a-z0-9](?:-*[a-z0-9])*)*\"\r\n```"},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/179542805","html_url":"https://github.com/docker/compose/issues/2816#issuecomment-179542805","issue_url":"https://api.github.com/repos/docker/compose/issues/2816","id":179542805,"user":{"login":"dnephin","id":442180,"avatar_url":"https://avatars.githubusercontent.com/u/442180?v=3","gravatar_id":"","url":"https://api.github.com/users/dnephin","html_url":"https://github.com/dnephin","followers_url":"https://api.github.com/users/dnephin/followers","following_url":"https://api.github.com/users/dnephin/following{/other_user}","gists_url":"https://api.github.com/users/dnephin/gists{/gist_id}","starred_url":"https://api.github.com/users/dnephin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnephin/subscriptions","organizations_url":"https://api.github.com/users/dnephin/orgs","repos_url":"https://api.github.com/users/dnephin/repos","events_url":"https://api.github.com/users/dnephin/events{/privacy}","received_events_url":"https://api.github.com/users/dnephin/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T00:04:20Z","updated_at":"2016-02-04T00:04:20Z","body":"@endophage we might be able to work around this from compose, but I think this is actually a bug in docker engine.\r\n\r\nAn invalid input should be a 400 status code, not a 500."}}