-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change shelled out calls to Docker remote API #35
Comments
Also useful: link to Docker remote API reference - https://docs.docker.com/reference/api/docker_remote_api/ |
Initial work for calling Docker remote API instead of shelling out commands. Uses hard coded boot2docker defaults. These will need to be configurable to allow for boot2docker non-defaults and unix sockets.
go lang docs for network operations: https://golang.org/pkg/net/ |
Continuing experimenting with Docker remote API.
I'm making good progress on this on branch feature/use-docker-remote-api but need to improve my understanding of the language as the Go I'm writing is poor. |
Closing this in favour of #46, in which custom code calling the Docker CLI or remote API will be replaced by a library that does the same job. |
The approach I've taken to #22 involves more shelled out calls to the Docker CLI. This is getting ugly and there may be a better way: talking to the Docker remote API directly and parsing the json it returns instead of hacking around with the arbitrary text returned by the CLI.
Boot2docker example query piped into jq:
Gives a (much longer) version of this response:
In this thread, it's noted that the version of curl that comes with osx doesn't work with the above command (I've confirmed on Yosemite which is curl 7.30.0).
Running the latest curl downloadable through brew (7.42.0 currently) allows the command to work which is something to bear in mind when developing this change as I'm not sure what http libraries are available in go.
The text was updated successfully, but these errors were encountered: