{"action":"created","issue":{"url":"https://api.github.com/repos/dokku/dokku/issues/2267","repository_url":"https://api.github.com/repos/dokku/dokku","labels_url":"https://api.github.com/repos/dokku/dokku/issues/2267/labels{/name}","comments_url":"https://api.github.com/repos/dokku/dokku/issues/2267/comments","events_url":"https://api.github.com/repos/dokku/dokku/issues/2267/events","html_url":"https://github.com/dokku/dokku/issues/2267","id":162293559,"number":2267,"title":"[RFC] Replace docker binary calls with direct api calls","user":{"login":"josegonzalez","id":65675,"avatar_url":"https://avatars.githubusercontent.com/u/65675?v=3","gravatar_id":"","url":"https://api.github.com/users/josegonzalez","html_url":"https://github.com/josegonzalez","followers_url":"https://api.github.com/users/josegonzalez/followers","following_url":"https://api.github.com/users/josegonzalez/following{/other_user}","gists_url":"https://api.github.com/users/josegonzalez/gists{/gist_id}","starred_url":"https://api.github.com/users/josegonzalez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josegonzalez/subscriptions","organizations_url":"https://api.github.com/users/josegonzalez/orgs","repos_url":"https://api.github.com/users/josegonzalez/repos","events_url":"https://api.github.com/users/josegonzalez/events{/privacy}","received_events_url":"https://api.github.com/users/josegonzalez/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dokku/dokku/labels/type:%20rfc","name":"type: rfc","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-25T18:24:52Z","updated_at":"2016-07-07T19:20:04Z","closed_at":null,"body":"Dokku currently calls the docker binary on the same host whenever communicating with Docker to run commands. This has a few limitations:\r\n\r\n- The `docker` cli interface has changed in the past, requiring patches and new releases to support the new interface.\r\n- Dokku can currently only orchestrate docker if it is installed on the same host.\r\n- Dokku package installations have a *hard* dependency upon the `docker-engine` package, which means there is a bit of fancy footwork to make it happy within a Dockerfile deploy.\r\n\r\n@michaelshobbs mentioned that we could communicate directly with the docker api. This would mean a few things:\r\n\r\n- We can peg to a specific version of the api as - in theory - the api will not be broken regardless of your docker version.\r\n- We can support systems such as Joyent's Triton or similar that expose a docker-like api.\r\n- We can support remote clients.\r\n\r\nThere are currently 30 unique direct api calls within the core - not counting documentation, tests, or official plugins. \r\n\r\nThere is quite a bit of api stability to be gained here, though updating the core and official plugins to use an internal api wrapper could be a substantial piece of work. Opening this issue for discussion purposes."},"comment":{"url":"https://api.github.com/repos/dokku/dokku/issues/comments/231180081","html_url":"https://github.com/dokku/dokku/issues/2267#issuecomment-231180081","issue_url":"https://api.github.com/repos/dokku/dokku/issues/2267","id":231180081,"user":{"login":"u2mejc","id":11339468,"avatar_url":"https://avatars.githubusercontent.com/u/11339468?v=3","gravatar_id":"","url":"https://api.github.com/users/u2mejc","html_url":"https://github.com/u2mejc","followers_url":"https://api.github.com/users/u2mejc/followers","following_url":"https://api.github.com/users/u2mejc/following{/other_user}","gists_url":"https://api.github.com/users/u2mejc/gists{/gist_id}","starred_url":"https://api.github.com/users/u2mejc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/u2mejc/subscriptions","organizations_url":"https://api.github.com/users/u2mejc/orgs","repos_url":"https://api.github.com/users/u2mejc/repos","events_url":"https://api.github.com/users/u2mejc/events{/privacy}","received_events_url":"https://api.github.com/users/u2mejc/received_events","type":"User","site_admin":false},"created_at":"2016-07-07T19:20:04Z","updated_at":"2016-07-07T19:20:04Z","body":"I support this. I had talked to Michael about switching to the API back when I first did a tech demo of dokku on swam, before 1.0. The API back then was, rough. I carry forward the impression that it's still a second class citizen to the CLI, but I think the advantages still outweigh that negative. \r\n\r\nExpanding the advantages mentioned above, a normal stable API should have:\r\n- Machine readable responses, no more crazy bash / regex fu skillz needed. I used one file from another project: https://github.com/ingydotnet/json-bash/blob/master/lib/json.bash which worked really well to build pseudo objects with and then easly reference.\r\n- No local docker client required, and no special dokku_client.sh remote wrapper required anymore\r\n\r\nIf we implement this as a pluggable abstraction layer, we could allow swapping back ends with other services like ECS, or maybe even Mesos, etc.\r\n\r\nTargeting the most recent api version for each release would ensure the most longevity possible if we don't pin to docker client versions. This is not to be beholden to always having to update our code to support any new changes for the sake of change, instead it's because Docker doesn't have an official deprecation cycle published for their API. In addition to that, they haven't to put forth any guarantees that the API won't change inside version (peering into the code makes that more obvious)."}}
{"actor":{"display_login":"u2mejc"}}