{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/13293","labels_url":"https://api.github.com/repos/docker/docker/issues/13293/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/13293/comments","events_url":"https://api.github.com/repos/docker/docker/issues/13293/events","html_url":"https://github.com/docker/docker/issues/13293","id":77548571,"number":13293,"title":"Proposal: provide API for dockerfile parser","user":{"login":"TomasTomecek","id":1662493,"avatar_url":"https://avatars.githubusercontent.com/u/1662493?v=3","gravatar_id":"","url":"https://api.github.com/users/TomasTomecek","html_url":"https://github.com/TomasTomecek","followers_url":"https://api.github.com/users/TomasTomecek/followers","following_url":"https://api.github.com/users/TomasTomecek/following{/other_user}","gists_url":"https://api.github.com/users/TomasTomecek/gists{/gist_id}","starred_url":"https://api.github.com/users/TomasTomecek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomasTomecek/subscriptions","organizations_url":"https://api.github.com/users/TomasTomecek/orgs","repos_url":"https://api.github.com/users/TomasTomecek/repos","events_url":"https://api.github.com/users/TomasTomecek/events{/privacy}","received_events_url":"https://api.github.com/users/TomasTomecek/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-18T07:57:35Z","updated_at":"2015-05-20T17:20:01Z","closed_at":"2015-05-20T15:30:52Z","body":"When we build layered images, we tend to parse and edit dockerfiles. I think it would be really benefitial to have one, single codebase which would be responsible for parsing dockerfiles: the docker itself.\r\n\r\nTherefore I would like to propose to have a new command in docker's CLI which would use the native parser of dockerfiles and would be capable of providing serializable output.\r\n\r\nMotivation behind this is that when we parse dockerfiles with our custom parser, we can't be sure how the instructions will be parsed during build (will it strip whitespace? what happens with `\\` in multiline instructions? what is the precise syntax for `LABEL`s?)\r\n\r\nIn case of positive feedback, I'll provide more thorough proposal with specification of the output and the whole interface."},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/103966542","html_url":"https://github.com/docker/docker/issues/13293#issuecomment-103966542","issue_url":"https://api.github.com/repos/docker/docker/issues/13293","id":103966542,"user":{"login":"TomasTomecek","id":1662493,"avatar_url":"https://avatars.githubusercontent.com/u/1662493?v=3","gravatar_id":"","url":"https://api.github.com/users/TomasTomecek","html_url":"https://github.com/TomasTomecek","followers_url":"https://api.github.com/users/TomasTomecek/followers","following_url":"https://api.github.com/users/TomasTomecek/following{/other_user}","gists_url":"https://api.github.com/users/TomasTomecek/gists{/gist_id}","starred_url":"https://api.github.com/users/TomasTomecek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomasTomecek/subscriptions","organizations_url":"https://api.github.com/users/TomasTomecek/orgs","repos_url":"https://api.github.com/users/TomasTomecek/repos","events_url":"https://api.github.com/users/TomasTomecek/events{/privacy}","received_events_url":"https://api.github.com/users/TomasTomecek/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T17:20:01Z","updated_at":"2015-05-20T17:20:01Z","body":"I don't understand why it needs to be an external tool. I guess it shouldn't be hard to create one."}}