This repository was archived by the owner on Dec 9, 2024. It is now read-only.
This repository was archived by the owner on Dec 9, 2024. It is now read-only.
Invoke local using Docker to support any runtime #119
Closed
Description
Problem
Currently, serverless invoke local
is implemented for nodejs and python runtimes by simply running a local Node or Python with the right script. It does not replicate the actual container environment nor does it work for other runtimes or custom images (blackboxes).
Idea
Add a new option to invoke local
that relies on a local Docker and would act like an OpenWhisk invoker:
- identify the right image - either explicit
image
inserverless.yml
or lookup based onruntime
(kind
in wsk) - start the container using Docker
- post the packaged action to
/init
on the server on port 8080 - execute it via
/run
- kill the container
In our case, we'd like to use this for unit testing of actions with custom containers, and for that we'd need volume mounting on the container to make our life a lot easier. To keep it simple, it would be good to allow passing any additional docker run
options from the serverless invoke local
arguments.
State
We are intending to work on this and provide this as PR if desired.
Metadata
Metadata
Assignees
Labels
No labels