{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/5714","labels_url":"https://api.github.com/repos/docker/docker/issues/5714/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/5714/comments","events_url":"https://api.github.com/repos/docker/docker/issues/5714/events","html_url":"https://github.com/docker/docker/issues/5714","id":33218294,"number":5714,"title":"enqueue ONBUILD instructions from multiple ancestors","user":{"login":"fabiokung","id":5755,"avatar_url":"https://avatars.githubusercontent.com/u/5755?v=3","gravatar_id":"","url":"https://api.github.com/users/fabiokung","html_url":"https://github.com/fabiokung","followers_url":"https://api.github.com/users/fabiokung/followers","following_url":"https://api.github.com/users/fabiokung/following{/other_user}","gists_url":"https://api.github.com/users/fabiokung/gists{/gist_id}","starred_url":"https://api.github.com/users/fabiokung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabiokung/subscriptions","organizations_url":"https://api.github.com/users/fabiokung/orgs","repos_url":"https://api.github.com/users/fabiokung/repos","events_url":"https://api.github.com/users/fabiokung/events{/privacy}","received_events_url":"https://api.github.com/users/fabiokung/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/dist","name":"dist","color":"5319e7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-05-09T23:26:21Z","updated_at":"2015-07-10T19:06:37Z","closed_at":"2015-07-10T19:06:37Z","body":"I'm sorry for the lack of a better name for this feature request.\r\n\r\nI want heroku buildpacks to be docker images. That way, Heroku apps could be built with Docker, generating both a valid docker container to run the app, and a valid Heroku slug that could be deployed to Heroku.\r\n\r\nWhile playing with the idea, I found that all buildpacks will have a common set of `ONBUILD` instructions. Eg.: all buildpacks need to run their `bin/compile` against the app source code.\r\n\r\nInitially I thought that chaining `ONBUILD` (#4244) in a base image for buildpacks could be a solution to avoid all buildpacks having to C&P a piece of shared Dockerfile:\r\n\r\n[Using Heroku buildpacks as Docker images to build apps](https://gist.github.com/fabiokung/4d04042fecb1d5cbca75).\r\n\r\nDiscussions on irc (#docker-dev) made me realize that `ONBUILD ONBUILD` may not be very flexible. It would only allow `buildpack-base -> buildpack -> app` hierarchies. Composing buildpack images (a.k.a. buildpack-multi) would not be possible that way (eg.: `buildpack-base -> buildpack-ruby -> buildpack-pgbouncer -> app`.\r\n\r\nSome alternatives that were proposed:\r\n\r\n* Introspection: allow buildpacks to call `docker --introspect --change \"ONBUILD RUN ...` and similar things during build. That way buildpack images could enqueue their `ONBUILD` commands and propagate `ONBUILD` commands from their ancestors.\r\n\r\n* Chained `docker build` invocations, as [suggested by @proppy](https://gist.github.com/proppy/449f184d178c60277ed7). It's not clear to me though how it would enable the use case I originally mentioned (Heroku buildpacks as docker images).\r\n\r\n* `INCLUDE`: #735. With it buildpacks could just add the shared set of commands to their Dockerfiles.\r\n\r\nAny other ideas? I'm happy to help with code and PRs once we settle on a design."},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/120495965","html_url":"https://github.com/docker/docker/issues/5714#issuecomment-120495965","issue_url":"https://api.github.com/repos/docker/docker/issues/5714","id":120495965,"user":{"login":"jfrazelle","id":1445228,"avatar_url":"https://avatars.githubusercontent.com/u/1445228?v=3","gravatar_id":"","url":"https://api.github.com/users/jfrazelle","html_url":"https://github.com/jfrazelle","followers_url":"https://api.github.com/users/jfrazelle/followers","following_url":"https://api.github.com/users/jfrazelle/following{/other_user}","gists_url":"https://api.github.com/users/jfrazelle/gists{/gist_id}","starred_url":"https://api.github.com/users/jfrazelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfrazelle/subscriptions","organizations_url":"https://api.github.com/users/jfrazelle/orgs","repos_url":"https://api.github.com/users/jfrazelle/repos","events_url":"https://api.github.com/users/jfrazelle/events{/privacy}","received_events_url":"https://api.github.com/users/jfrazelle/received_events","type":"User","site_admin":false},"created_at":"2015-07-10T19:06:37Z","updated_at":"2015-07-10T19:06:37Z","body":"Hello!\r\nWe are no longer accepting patches to the Dockerfile syntax as you can read about here: https://github.com/docker/docker/blob/master/ROADMAP.md#22-dockerfile-syntax\r\n\r\nMainly:\r\n> Allowing the Builder to be implemented as a separate utility consuming the Engine's API will open the door for many possibilities, such as offering alternate syntaxes or DSL for existing languages without cluttering the Engine's codebase\r\n\r\nThen from there, patches/features like this can be re-thought. Hope you can understand."}}