Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My biggest problem with serverless functions is development and testing. Can I run these locally? even better offline?


As we mentioned in the blog post, there is zero difference between a `Dockerfile` you execute locally and one that you give to us.

[One of the differences is performance. You'll find that we can build and execute much more quickly :)]

There are many examples here: https://github.com/zeit/now-examples


> we can build [...] much more quickly

Care to elaborate? Did you write your own container builder (for example like Google did with kaniko) that you use instead of docker? If not, I fail to see how you can build faster than me locally.


So, I'm not running the same docker image, just something somewhat similar built from the same Dockerfile?


> something somewhat similar built from the same Dockerfile?

Yes. We build the container based on the Dockerfile.


Now uses Docker so you just need to also use Docker to run your container, there is nothing special to do to run it in locally or offline since we don't require you an specific runtime or API. Just a normal HTTP server running inside a normal Docker container.


AFAIK at least AWS Lambda has a Docker based CLI that lets you run functions locally.

I guess since the Zeit solution is based on Docker something like this should also be possible...


ah, I didnt know that. I assume you mean this? https://github.com/lambci/docker-lambda





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: