{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/2601","repository_url":"https://api.github.com/repos/docker/compose","labels_url":"https://api.github.com/repos/docker/compose/issues/2601/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/2601/comments","events_url":"https://api.github.com/repos/docker/compose/issues/2601/events","html_url":"https://github.com/docker/compose/pull/2601","id":124856364,"number":2601,"title":"Only build as part of `up` if `--build` flag is set","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},"labels":[{"url":"https://api.github.com/repos/docker/compose/labels/area/up","name":"area/up","color":"c7def8"},{"url":"https://api.github.com/repos/docker/compose/labels/status/0-triage","name":"status/0-triage","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/docker/compose/milestones/15","html_url":"https://github.com/docker/compose/milestones/1.7.0","labels_url":"https://api.github.com/repos/docker/compose/milestones/15/labels","id":1505770,"number":15,"title":"1.7.0","description":"","creator":{"login":"aanand","id":1062,"avatar_url":"https://avatars.githubusercontent.com/u/1062?v=3","gravatar_id":"","url":"https://api.github.com/users/aanand","html_url":"https://github.com/aanand","followers_url":"https://api.github.com/users/aanand/followers","following_url":"https://api.github.com/users/aanand/following{/other_user}","gists_url":"https://api.github.com/users/aanand/gists{/gist_id}","starred_url":"https://api.github.com/users/aanand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aanand/subscriptions","organizations_url":"https://api.github.com/users/aanand/orgs","repos_url":"https://api.github.com/users/aanand/repos","events_url":"https://api.github.com/users/aanand/events{/privacy}","received_events_url":"https://api.github.com/users/aanand/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":7,"state":"open","created_at":"2016-01-13T21:18:15Z","updated_at":"2016-02-29T23:17:14Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2016-01-04T22:43:02Z","updated_at":"2016-03-01T13:18:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/compose/pulls/2601","html_url":"https://github.com/docker/compose/pull/2601","diff_url":"https://github.com/docker/compose/pull/2601.diff","patch_url":"https://github.com/docker/compose/pull/2601.patch"},"body":"Fixes #693\r\nCloses #12\r\n\r\nMany users have been confused by the default build behaviour of `up`. \r\n\r\nThis PR has been updated with the following behaviour:\r\n* if the image doesn't exist build it, but warn that this is a one-time thing, and that you need to use `--build` in the future\r\n* add `--build` to `up` and `create` to allow images to be built with a single command"},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/190720556","html_url":"https://github.com/docker/compose/pull/2601#issuecomment-190720556","issue_url":"https://api.github.com/repos/docker/compose/issues/2601","id":190720556,"user":{"login":"cr7pt0gr4ph7","id":3719586,"avatar_url":"https://avatars.githubusercontent.com/u/3719586?v=3","gravatar_id":"","url":"https://api.github.com/users/cr7pt0gr4ph7","html_url":"https://github.com/cr7pt0gr4ph7","followers_url":"https://api.github.com/users/cr7pt0gr4ph7/followers","following_url":"https://api.github.com/users/cr7pt0gr4ph7/following{/other_user}","gists_url":"https://api.github.com/users/cr7pt0gr4ph7/gists{/gist_id}","starred_url":"https://api.github.com/users/cr7pt0gr4ph7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cr7pt0gr4ph7/subscriptions","organizations_url":"https://api.github.com/users/cr7pt0gr4ph7/orgs","repos_url":"https://api.github.com/users/cr7pt0gr4ph7/repos","events_url":"https://api.github.com/users/cr7pt0gr4ph7/events{/privacy}","received_events_url":"https://api.github.com/users/cr7pt0gr4ph7/received_events","type":"User","site_admin":false},"created_at":"2016-03-01T13:18:05Z","updated_at":"2016-03-01T13:18:05Z","body":"After thinking a bit about it, I think that I'd be happy with the behavior that is outlined in the PR description. This includes both the first-time warning on `up`, and the `--build` flags to be added to `up` and `create`.\r\n\r\nI'd addtionally suggest two things:\r\n* Make it possible to disable the warning on the first invocation of `up` (e.g. `--build-only-once`).\r\n* Maybe it is possible to merge `--build`, `--no-build` and `--build-only-once` into a single option:\r\n  * `--build=never`: This is equivalent to `--no-build`.\r\n  * `--build=once`: This is equivalent to the current behavior.\r\n    This should be the default behavior; but if the flag is explicitly specified, the first-time build warning should be skipped.\r\n  * `--build=always`: This is equivalent to the proposed `--build` flag.\r\n    If only `--build` is specified (without an explicit mode specification), it should be treated as `--build=always`."}}