Show HN: Run Docker images as serverless functions
github.comI love things that can be self-hosted. Another thing I love is building things with the UNIX philosophy in mind - simple, modular, and composable software that perform specific tasks well. And I think that containerization on top of serverless can help immensely with just that.
Seeing as there aren't as many solutions currently out there that would enable me to run containers as serverless functions I decided to build something myself.
The way this applications runs those containers as functions is by exposing an HTTP API that you can call to start a new container, pass it some data as a JSON payload, do some stuff inside the container, and return some JSON data back to the caller. Both the request and response are stored inside a request-scoped directory mounted to the container along with environment variables for finding both of them, and you use those to communicate. You can basically use any language or runtime (or combination of them) as long as they're able to read and write to a JSON file.
I know that the whole point of "serverless" is to not have to manage servers, but a lot of the serverless providers available put certain limits and constraints on what your functions can do and what they can't. Sometimes you just want a simple way of running isolated code over an HTTP interface, and that's why this app exists.
I just started the project two days ago, but I plan on both extending and improving it further as time goes on. But since the application does what I wanted to achieve, I thought I'd share it with you all and hear your thoughts on this.
No comments yet.