{"action":"created","issue":{"url":"https://api.github.com/repos/tes/bosco/issues/83","labels_url":"https://api.github.com/repos/tes/bosco/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/tes/bosco/issues/83/comments","events_url":"https://api.github.com/repos/tes/bosco/issues/83/events","html_url":"https://github.com/tes/bosco/issues/83","id":71327349,"number":83,"title":"Docker 'build: true' needs to be in the project directory","user":{"login":"cliftonc","id":239305,"avatar_url":"https://avatars.githubusercontent.com/u/239305?v=3","gravatar_id":"","url":"https://api.github.com/users/cliftonc","html_url":"https://github.com/cliftonc","followers_url":"https://api.github.com/users/cliftonc/followers","following_url":"https://api.github.com/users/cliftonc/following{/other_user}","gists_url":"https://api.github.com/users/cliftonc/gists{/gist_id}","starred_url":"https://api.github.com/users/cliftonc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cliftonc/subscriptions","organizations_url":"https://api.github.com/users/cliftonc/orgs","repos_url":"https://api.github.com/users/cliftonc/repos","events_url":"https://api.github.com/users/cliftonc/events{/privacy}","received_events_url":"https://api.github.com/users/cliftonc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-27T15:52:33Z","updated_at":"2015-04-27T15:57:03Z","closed_at":null,"body":"Most bosco commands are run from the root of the workspace (e.g. ```resources```).  If you run:\r\n\r\n```\r\nbosco run -r nginx\r\n```\r\n\r\nWith nginx configured this way, it fails to build:\r\n\r\n```\r\n➜  404  bosco run -r nginx\r\n[04:51:18] Bosco: Maybe he can't, but I can!\r\n[04:51:18] Bosco: Initialised using [/Users/cliftonc/.bosco/bosco.json] in environment [local] with team [tes/404]\r\n[04:51:18] Bosco: Run each microservice ... \r\n[04:51:18] Bosco: Removing stopped/dead services\r\n[04:51:18] Bosco: Running docker service infra-nginx-gateway ...\r\n[04:51:18] Bosco: Building image for infra-nginx-gateway ...\r\n[04:52:24] Bosco: Error: HTTP code is 500 which indicates error: server error - Cannot build a directory without a Dockerfile\r\n\r\n    at /Users/cliftonc/work/bosco/node_modules/dockerode/node_modules/docker-modem/lib/modem.js:207:17\r\n    at IncomingMessage.<anonymous> (/Users/cliftonc/work/bosco/node_modules/dockerode/node_modules/docker-modem/lib/modem.js:232:9)\r\n    at IncomingMessage.emit (events.js:117:20)\r\n    at _stream_readable.js:944:16\r\n    at process._tickDomainCallback (node.js:486:13)\r\n\r\n/Users/cliftonc/work/bosco/src/RunWrappers/DockerUtils.js:174\r\n        stream.on('data', function(data) {\r\n               ^\r\nTypeError: Cannot call method 'on' of null\r\n    at /Users/cliftonc/work/bosco/src/RunWrappers/DockerUtils.js:174:16\r\n    at /Users/cliftonc/work/bosco/node_modules/dockerode/lib/docker.js:147:5\r\n    at /Users/cliftonc/work/bosco/node_modules/dockerode/node_modules/docker-modem/lib/modem.js:213:7\r\n    at IncomingMessage.<anonymous> (/Users/cliftonc/work/bosco/node_modules/dockerode/node_modules/docker-modem/lib/modem.js:232:9)\r\n    at IncomingMessage.emit (events.js:117:20)\r\n    at _stream_readable.js:944:16\r\n    at process._tickDomainCallback (node.js:486:13)\r\n```\r\n\r\nThe reason appears to be that the Docker file is trying to build the image where bosco is being run, not where the project is.\r\n"},"comment":{"url":"https://api.github.com/repos/tes/bosco/issues/comments/96722329","html_url":"https://github.com/tes/bosco/issues/83#issuecomment-96722329","issue_url":"https://api.github.com/repos/tes/bosco/issues/83","id":96722329,"user":{"login":"cliftonc","id":239305,"avatar_url":"https://avatars.githubusercontent.com/u/239305?v=3","gravatar_id":"","url":"https://api.github.com/users/cliftonc","html_url":"https://github.com/cliftonc","followers_url":"https://api.github.com/users/cliftonc/followers","following_url":"https://api.github.com/users/cliftonc/following{/other_user}","gists_url":"https://api.github.com/users/cliftonc/gists{/gist_id}","starred_url":"https://api.github.com/users/cliftonc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cliftonc/subscriptions","organizations_url":"https://api.github.com/users/cliftonc/orgs","repos_url":"https://api.github.com/users/cliftonc/repos","events_url":"https://api.github.com/users/cliftonc/events{/privacy}","received_events_url":"https://api.github.com/users/cliftonc/received_events","type":"User","site_admin":false},"created_at":"2015-04-27T15:57:03Z","updated_at":"2015-04-27T15:57:03Z","body":"Not sure how you do this by the way, but this looks promising:\r\n\r\nhttps://github.com/apocas/dockerode/blob/master/examples/build/build_img_cwd.js#L8"}}