Search code examples
dockercontainersdocker-registrydocker-buildcontainer-registry

Docker: setting up `docker build` as a service


I'm looking to be able to build docker containers on the fly given a docker file. That is, given a docker file, I want to be able to send the file to a remote "build service", which builds it for me programatically. Are there any hosted or open source services that provide this?

Note that I'm not looking to build images on CI, but rather do something in code like this:

def build_image(dockerfile_contents):
    resp = docker_service.build(dockerfile_contents)
    ...

A simple rest API would be perfect. Any thoughts or ideas?


Solution

  • Seems like the best solution is to self-host something like kaniko. The post by @Ali Tou here seems like a more involved, but viable option.