This project executes arbitrary JavaScript code within the context of a Docker container.
It receives the code and a single parameter in an HTTP POST request, creates a docker container, executes the code in the container, and then returns the result over the same POST request.
I consider this at the proof-of-concept stage. I figured out how to do all the basic requirements, but I don't consider the project up to professional
standards. For specifics, see the Remaining Work
section below. For an idea of a more polished project, please see:
$ npm start
$ curl -F "app=@examples/script2.js" -F param=4 http://veterok.local:3000/process
Note: It looks like the provided script2.js
is a duplicate of script1.js
.
- Automated Testing, Continuous Integration, etc
- More flexible parameter handling
- Authentication on HTTP requests
- File System Security - Right now all spaces are readable by all users
- General Cleanup - Code organization and conventions, promises vs callbacks, etc
- Docker on OS X
- Getting Started with Docker for the NodeJS Dev
- Microservices, Node.js, Containers!
- Decking.io
- Express / Koa / Hapi Comparison
- Docker remote api on OS X This helped me figure out how to address the Docker container vm