This is a work in progress for implementing docker based invoke local support.
Feedback greatly appreciated
What did you implement:
The main benefits are:
How did you implement it:
How can we verify it:
Is this ready for review?: NO
Just test it today and it works great so far
Just added some comments for code snippets I had to swap out in order to make this work.
While playing around with this I had a some questions about compiled runtimes and dependency usage. The Serverless Framework for example ships with different templates for different build systems. Is there something special we need to do here if we e.g. pick Java as a runtime and use
A prodct call would be if we want to add Docker supported invoke local on newer runtimes and e.g. keep the older ones where no Docker was needed before. We could implement a simple check which runtime is used and then only execute the Docker path once one of the compiled / newer runtimes is used. This way not all users need to install Docker to use
Also thinking layer content should be cached between invokations (SAM does this too). Should that live in a global cache/tmp dir? or in .serverless? Do we have any caching in the framework currently?
Just tested it with the follwoing config and it works fine!
service: name: test provider: name: aws stage: dev runtime: nodejs8.10 functions: hello: handler: handler.hello layers: - arn:aws:lambda:us-east-1:744348701589:layer:bash:5
Also used Python and Ruby in combination with
Thanks for addressing the PR comments
Just looked into this again and tested it thoroughly. Works great. I just added a check whether the Docker daemon is running. This way users won't be surprised if
Will merge once the build is green.