Skip to content

feat(lambda) add docker image support for lambda. #8109

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

Closed
wants to merge 1 commit into from

Conversation

Schartey
Copy link

@Schartey Schartey commented Dec 7, 2021

We are currently restricted to usage of a node sandbox as lambda server.

With this pull request I want to add support for docker containers to run as lambda server. This allows developers to use any server language they want to develop lambdas.

How does it work:

  • Rebased the Dockerfile on a dind ubuntu image, so we can start docker images on alpha.
  • Added multiple flags to lambda: docker-image, docker-user, docker-password, docker-registry
  • If docker-image flag is set, alpha tries to download docker image and runs image as container instead of node

Example:
I have created an example repository that uses golang as lambda server.
Here you can find an example docker-compose file on how to start the alpha server with docker image.

What's missing:

  • admin api update
    Allow update of docker image through admin api
  • Refactoring
  • Tests
  • Your opinion

About alternatives:
I thought a lot about alternatives and tried to implement WebAssembly as runtime, but it is still very restricted. I could only make it work with Rust and Typescript, but I think Docker is a better and simpler alternative.


This change is Reviewable

@Schartey
Copy link
Author

Schartey commented Dec 9, 2021

After some discussions in discuss, I will close this pull request and create a new one for WASM support in lambdas in due time.

@Schartey Schartey closed this Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant