-
-
Notifications
You must be signed in to change notification settings - Fork 793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial Implementation for adding custom container support #1611
Conversation
thank you for putting in the time and effort @jcampbell05 ! this is greatly appreciated! it might take some time to get to your PR, stay tuned. 😉 |
@dnalborczyk I'm keen to get a working solution as this would be very useful to us. Do you have time to walk through this ? |
any updates about the status of this PR ? |
Still waiting on @dnalborczyk |
@jcampbell05 Can you resolve conflicts ? |
I've resolved |
@myx-oneoonine Feedback resolved |
Closing because this PR has been open for too long. Sorry it was not merged, please publish a newer PR if you still want this behavior in the codebase. |
Description
This is an initial proof of concept of adding custom container support to Serverless Offline. This PR was opened so we can discuss the implementation to hopefully land on something that can be merged.
provider.ecr.images
section.image
instead of ahandler
The current implementation has a few limitations and drawbacks:
These can be changed from the default settings which would break this code since there is no way at the moment to tell this code how the Dockerfile has been configured. However as a workaround the code in the container could just detect the SLS_OFFLNE environmental variable and configure itself in a manner that would work.
The intention is we would incrementally add support for more configurations and use cases over time. Rather than waiting for the perfect implementation which covers all use cases which in my view would increase likelihood this project just ends up not supporting any use case.
Motivation and Context
For those who have moved to using containers with lambda then currently you cannot use serverless offline since it only supports handlers uploaded as a .zip file which forces workarounds such as two configuration files one for production and one for development.
You can read more here #1324
How Has This Been Tested?
At the moment I have tested against our own project which already specified a lambda and a Dockerfile since this is a POC. But when I make this code production ready I aim to add a suite of tests to the ones which already exist here.
The majority of the code has been untouched so it should work.
Screenshots (if appropriate):