{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/6276","repository_url":"https://api.github.com/repos/docker/compose","labels_url":"https://api.github.com/repos/docker/compose/issues/6276/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/6276/comments","events_url":"https://api.github.com/repos/docker/compose/issues/6276/events","html_url":"https://github.com/docker/compose/issues/6276","id":370250210,"node_id":"MDU6SXNzdWUzNzAyNTAyMTA=","number":6276,"title":"docker-compose build command for build network option in yml not creating network automatically","user":{"login":"myuseringithub","id":7758497,"node_id":"MDQ6VXNlcjc3NTg0OTc=","avatar_url":"https://avatars0.githubusercontent.com/u/7758497?v=4","gravatar_id":"","url":"https://api.github.com/users/myuseringithub","html_url":"https://github.com/myuseringithub","followers_url":"https://api.github.com/users/myuseringithub/followers","following_url":"https://api.github.com/users/myuseringithub/following{/other_user}","gists_url":"https://api.github.com/users/myuseringithub/gists{/gist_id}","starred_url":"https://api.github.com/users/myuseringithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myuseringithub/subscriptions","organizations_url":"https://api.github.com/users/myuseringithub/orgs","repos_url":"https://api.github.com/users/myuseringithub/repos","events_url":"https://api.github.com/users/myuseringithub/events{/privacy}","received_events_url":"https://api.github.com/users/myuseringithub/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-15T16:46:27Z","updated_at":"2018-10-15T22:06:47Z","closed_at":"2018-10-15T22:06:47Z","author_association":"NONE","body":"docker-compose build command seems to handle networks incorrectly\r\n\r\nRunning the following build command throws:\r\n`docker-compose -f ./compose.yml build x`\r\nError: \r\n```\r\nWARNING: Some networks were defined but are not used by any service: y\r\nBuilding x\r\nStep 1/2 : FROM alpine:latest\r\n ---> 11cd0b38bc3c\r\nStep 2/2 : RUN echo 'something'\r\n ---> Running in 476b14ea1f81\r\nERROR: Service 'x' failed to build: network y not found\r\n```\r\n\r\n_yaml compose file `compose.yml`:_\r\n```\r\nversion: '3.7'\r\n\r\nnetworks: \r\n    \"y\":\r\n      driver: bridge \r\n\r\nservices:\r\n  \"x\": \r\n    image: alpine:latest \r\n    build: \r\n        context: ./ \r\n        dockerfile: ./dockerfile\r\n        network: \r\n            \"y\" \r\n```\r\n_`dockerfile`:_\r\n```\r\nFROM alpine:latest\r\nRUN echo 'something'\r\n```\r\n\r\n### Additional information\r\nDocker for Windows (edge channel) also reproduced on stable channel, Windows 10 pro\r\n```\r\nDocker version 18.09.0-ce-beta1, build 78a6bdb\r\ndocker-compose version 1.22.0, build f46880fe \r\nalso throws using:\r\ndocker-compose version 1.23.0-rc2, build 350a555e\r\n```"},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/430031160","html_url":"https://github.com/docker/compose/issues/6276#issuecomment-430031160","issue_url":"https://api.github.com/repos/docker/compose/issues/6276","id":430031160,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDAzMTE2MA==","user":{"login":"shin-","id":1086876,"node_id":"MDQ6VXNlcjEwODY4NzY=","avatar_url":"https://avatars3.githubusercontent.com/u/1086876?v=4","gravatar_id":"","url":"https://api.github.com/users/shin-","html_url":"https://github.com/shin-","followers_url":"https://api.github.com/users/shin-/followers","following_url":"https://api.github.com/users/shin-/following{/other_user}","gists_url":"https://api.github.com/users/shin-/gists{/gist_id}","starred_url":"https://api.github.com/users/shin-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shin-/subscriptions","organizations_url":"https://api.github.com/users/shin-/orgs","repos_url":"https://api.github.com/users/shin-/repos","events_url":"https://api.github.com/users/shin-/events{/privacy}","received_events_url":"https://api.github.com/users/shin-/received_events","type":"User","site_admin":false},"created_at":"2018-10-15T22:06:47Z","updated_at":"2018-10-15T22:06:47Z","author_association":"MEMBER","body":"Duplicate of #5447 "}}
{"actor":{"display_login":"shin-"}}