functions icon indicating copy to clipboard operation
functions copied to clipboard

Build / Push on API

Open WTFKr0 opened this issue 8 years ago • 2 comments

Hi

I think this project need to allow users to only use an API to do every thing, from build function to execute Today, you need the cli (or docker locally) to build the image and push it to registry I would like to do that by curl directly, like :

curl "http://api.functions/v1/functions/build?name=user/myfunc&version=0.0.1&runtime=go" -d '<content_of_func.go>'
or
curl "http://api.functions/v1/functions/build?name=user/myfunc&version=0.0.1&runtime=go&url=http://mysite.org/myfunc.go"

This need to implement docker build serverside This is how I imagine that on my project : https://github.com/nanoserverless/nanoserverless#create-pi-function-in-node7-time-to-build-from-node7-image

Tell me what you think

WTFKr0 avatar Feb 28 '17 23:02 WTFKr0

Hello @WTFKr0. So, here's the thing, IMHO using Docker images as function source makes functions execution more stable and predictive (see AWS Lambda problems with invalid ELF header).

Meanwhile you can create a function that will accept URL to a source file and execute it. But what about dependencies, what is an entry point, etc.

I tend to agree that having a capability to create functions from source packages (assume package is a *.tar file with all dependencies, etc.) would be a useful feature, what do you think @seiflotfy @pedronasser @treeder? Having Docker as the only way to create functions brings a lot limitations like:

  • Docker image should be available on DockerHub or on local registry
  • As developer developer without Docker i can build/deploy a function etc.

denismakogon avatar Mar 01 '17 01:03 denismakogon

Thanx for reply It's not a problem for us at the moment We plan to use other CI tool to build our functions and store them on our private registry Then we can create routes to publish them

WTFKr0 avatar Mar 01 '17 16:03 WTFKr0