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
Expose the entire Build API through REST and introspection #8032
Comments
IMHO what would be even better, is to expose the build api to containers via daemon introspection. That way you could write shell scripts inside containers and salt and puppet would just have to call dockerfile commands. It's a different (and more difficult?) approach but I find it more powerful, since it would finally enable docker build to be a full-fledged docker run, and the Dockerfile/Dockerscript to behave as anyone would expect. WDYT? |
That will also work but it strikes me as more complex. |
@tiborvass ping? |
@thedrow Don't get me wrong, I'm not necessarily opposed to an API for build as you described, I just wanted to point to daemon introspection as a possible solution. I agree it seems a bit complex, but for me the major benefit is that it would be "jailbreaking" the buildtime: right now certain things are allowed in docker run (volumes, editing /etc/hosts, etc.) that are not possible with docker build. But when you think about it, building is nothing more than just running a container as specified by a Dockerfile and a context and saving the resulting image. Except, that you don't have all the expressiveness of An equivalent solution today would be to do If there were daemon introspection, you could imagine a sortof
Keep in mind that it's far from clear for me what would be the best UI. 3rd parties could simply call a docker build API similar to the one we have today, and put their customizations in the Dockerscript (that would have a shebang):
Sorry if you feel I'm hijacking your issue. We can talk more on IRC (handle: tibor). |
Any updates on this one? |
I'm closing this since #13171 was merged which was the last blocker for implementing #14298. @jlhawn implemented an experimental client-side builder: https://github.com/jlhawn/dockramp which uses the new APIs in #13171. Hope this helps :) |
Currently it is only possible to build a docker image from a tarball containing a Dockerfile using the REST API.
There's no reason why we shouldn't be able to build a docker image entirely using the REST API.
This will enable integrations with multiple configuration management tools like Salt and Puppet which already have superior and less error prone provisioning capeabilities.
How hard would it be to achieve this?
It would involve exposing all commands in https://github.com/docker/docker/blob/master/builder/dispatchers.go if I understand correctly.
The text was updated successfully, but these errors were encountered: