Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #81 from triggermesh/runtimes-update
Browse files Browse the repository at this point in the history
Update Python, NodeJS and Ruby to the latest AWS Lambda versions
  • Loading branch information
tzununbekov committed Apr 1, 2023
2 parents ec0bfa4 + 279c4de commit 7f97c6b
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ jobs:
matrix:
include:
- runtime: java8
- runtime: node10
- runtime: node4
- runtime: node10
- runtime: node18
- runtime: python27
- runtime: python37
- runtime: python310
- runtime: ruby25
- runtime: ruby32

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
REPO = knative-lambda-runtime
REPO_DESC = TriggerMesh Knative Lambda Runtime
RUNTIMES = java8 node10 node4 python27 python37 ruby25
RUNTIMES = java8 node10 node4 node18 python27 python37 python310 ruby25 ruby32

BASE_DIR ?= $(CURDIR)

Expand Down
5 changes: 5 additions & 0 deletions node18/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Dockerfile
.dockerignore

**/*.md
**/.gitignore
16 changes: 16 additions & 0 deletions node18/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM alpine as downloader

RUN apk --no-cache add curl \
&& DOWNLOAD_URL=$(curl -sSf https://api.github.com/repos/triggermesh/aws-custom-runtime/releases/latest | grep "browser_download_url.*-linux-amd64" | cut -d: -f 2,3 | tr -d \") \
&& curl -sSfL ${DOWNLOAD_URL} -o /opt/aws-custom-runtime \
&& chmod +x /opt/aws-custom-runtime

FROM amazon/aws-lambda-nodejs:18

WORKDIR /opt

RUN mv /var/runtime/bootstrap /opt

COPY --from=downloader /opt/aws-custom-runtime /opt/

ENV LAMBDA_TASK_ROOT "/opt"
5 changes: 5 additions & 0 deletions python310/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Dockerfile
.dockerignore

**/*.md
**/.gitignore
22 changes: 22 additions & 0 deletions python310/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM alpine as downloader

RUN apk --no-cache add curl git \
&& DOWNLOAD_URL=$(curl -sSf https://api.github.com/repos/triggermesh/aws-custom-runtime/releases/latest | grep "browser_download_url.*-linux-amd64" | cut -d: -f 2,3 | tr -d \") \
&& curl -sSfL ${DOWNLOAD_URL} -o /opt/aws-custom-runtime \
&& chmod +x /opt/aws-custom-runtime \
&& git clone https://github.com/triggermesh/eventstore-python-client.git /opt/client

FROM amazon/aws-lambda-python:3.10

WORKDIR /opt

RUN pip install --upgrade pip \
&& pip install grpcio grpcio-tools

RUN mv /var/runtime/bootstrap /opt

COPY --from=downloader /opt/client/eventstore /opt/eventstore
COPY --from=downloader /opt/aws-custom-runtime /opt/

ENV PYTHONPATH "/opt/eventstore"
ENV LAMBDA_TASK_ROOT "/opt"
5 changes: 5 additions & 0 deletions ruby32/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Dockerfile
.dockerignore

**/*.md
**/.gitignore
17 changes: 17 additions & 0 deletions ruby32/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM alpine as downloader

RUN apk --no-cache add curl \
&& DOWNLOAD_URL=$(curl -sSf https://api.github.com/repos/triggermesh/aws-custom-runtime/releases/latest | grep "browser_download_url.*-linux-amd64" | cut -d: -f 2,3 | tr -d \") \
&& curl -sSfL ${DOWNLOAD_URL} -o /opt/aws-custom-runtime \
&& chmod +x /opt/aws-custom-runtime

FROM amazon/aws-lambda-ruby:3.2

WORKDIR /opt

RUN mv /var/runtime/bootstrap /opt

COPY --from=downloader /opt/aws-custom-runtime /opt/

ENV RUBYLIB "/opt"
ENV LAMBDA_TASK_ROOT "/opt"

0 comments on commit 7f97c6b

Please sign in to comment.