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

Commit

Permalink
images: pick the correct aws-custom-runtime binary
Browse files Browse the repository at this point in the history
  • Loading branch information
Sameer Naik committed Nov 23, 2020
1 parent 946cbde commit bee0b3c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions java8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COPY runtime /var/runtime

RUN apk update && apk add --no-cache libc6-compat curl \
&& API_VERSION=$(curl -sI https://github.com/triggermesh/aws-custom-runtime/releases/latest | grep -i "Location:" | awk -F "/" '{print $NF}' | tr -d "\r") \
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/${API_VERSION}/aws-custom-runtime > /var/runtime/mockserver \
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/${API_VERSION}/aws-custom-runtime-linux-amd64 > /var/runtime/mockserver \
&& chmod +x /var/runtime/mockserver

ENV LD_LIBRARY_PATH /lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib
Expand All @@ -23,4 +23,4 @@ ENTRYPOINT ["/usr/bin/java", \
"-Xshare:auto", \
"-XX:-TieredCompilation", \
"-jar", \
"/var/runtime/lib/LambdaJavaRTEntry-1.0.jar"]
"/var/runtime/lib/LambdaJavaRTEntry-1.0.jar"]
2 changes: 1 addition & 1 deletion node-10.x/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR /opt
RUN apk --no-cache add curl \
&& API_VERSION=$(curl -sI https://github.com/triggermesh/aws-custom-runtime/releases/latest | grep -i "Location:" | awk -F "/" '{print $NF}' | tr -d "\r") \
&& RUNTIME_VERSION=$(curl -sI https://github.com/triggermesh/knative-lambda-runtime/releases/latest | grep -i "Location:" | awk -F "/" '{print $NF}' | tr -d "\r") \
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/${API_VERSION}/aws-custom-runtime > aws-custom-runtime \
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/${API_VERSION}/aws-custom-runtime-linux-amd64 > aws-custom-runtime \
&& chmod +x aws-custom-runtime \
&& curl -sL https://github.com/triggermesh/knative-lambda-runtime/archive/${RUNTIME_VERSION}.tar.gz | tar -xz knative-lambda-runtime-${RUNTIME_VERSION}/node-10.x \
&& mv knative-lambda-runtime-${RUNTIME_VERSION}/node-10.x/* .
Expand Down
2 changes: 1 addition & 1 deletion node-4.x/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR /opt
RUN apk --no-cache add curl \
&& API_VERSION=$(curl -sI https://github.com/triggermesh/aws-custom-runtime/releases/latest | grep -i "Location:" | awk -F "/" '{print $NF}' | tr -d "\r") \
&& RUNTIME_VERSION=$(curl -sI https://github.com/triggermesh/knative-lambda-runtime/releases/latest | grep -i "Location:" | awk -F "/" '{print $NF}' | tr -d "\r") \
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/${API_VERSION}/aws-custom-runtime > aws-custom-runtime \
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/${API_VERSION}/aws-custom-runtime-linux-amd64 > aws-custom-runtime \
&& chmod +x aws-custom-runtime \
&& curl -sL https://github.com/triggermesh/knative-lambda-runtime/archive/${RUNTIME_VERSION}.tar.gz | tar -xz knative-lambda-runtime-${RUNTIME_VERSION}/node-4.x \
&& mv knative-lambda-runtime-${RUNTIME_VERSION}/node-4.x/* .
Expand Down
2 changes: 1 addition & 1 deletion python-2.7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR /opt
RUN apk --no-cache add curl \
&& API_VERSION=$(curl -sI https://github.com/triggermesh/aws-custom-runtime/releases/latest | grep -i "Location:" | awk -F "/" '{print $NF}' | tr -d "\r") \
&& RUNTIME_VERSION=$(curl -sI https://github.com/triggermesh/knative-lambda-runtime/releases/latest | grep -i "Location:" | awk -F "/" '{print $NF}' | tr -d "\r") \
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/${API_VERSION}/aws-custom-runtime > aws-custom-runtime \
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/${API_VERSION}/aws-custom-runtime-linux-amd64 > aws-custom-runtime \
&& chmod +x aws-custom-runtime \
&& curl -sL https://github.com/triggermesh/knative-lambda-runtime/archive/${RUNTIME_VERSION}.tar.gz | tar -xz knative-lambda-runtime-${RUNTIME_VERSION}/python-2.7 \
&& mv knative-lambda-runtime-${RUNTIME_VERSION}/python-2.7/* .
Expand Down
2 changes: 1 addition & 1 deletion python-3.7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apt-get update \
&& apt-get install -y curl \
&& API_VERSION=$(curl -sI https://github.com/triggermesh/aws-custom-runtime/releases/latest | grep -i "Location:" | awk -F "/" '{print $NF}' | tr -d "\r") \
&& RUNTIME_VERSION=$(curl -sI https://github.com/triggermesh/knative-lambda-runtime/releases/latest | grep -i "Location:" | awk -F "/" '{print $NF}' | tr -d "\r") \
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/${API_VERSION}/aws-custom-runtime > aws-custom-runtime \
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/${API_VERSION}/aws-custom-runtime-linux-amd64 > aws-custom-runtime \
&& chmod +x aws-custom-runtime \
&& curl -sL https://github.com/triggermesh/knative-lambda-runtime/archive/${RUNTIME_VERSION}.tar.gz | tar -xz knative-lambda-runtime-${RUNTIME_VERSION}/python-3.7 \
&& mv knative-lambda-runtime-${RUNTIME_VERSION}/python-3.7/* .
Expand Down
8 changes: 4 additions & 4 deletions ruby-2.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM lambci/lambda:ruby2.5
FROM ruby:2.5-alpine
WORKDIR /opt

RUN apk --no-cache add curl \
&& API_VERSION=$(curl -sI https://github.com/triggermesh/aws-custom-runtime/releases/latest | grep -i "Location:" | awk -F "/" '{print $NF}' | tr -d "\r") \
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/${API_VERSION}/aws-custom-runtime > aws-custom-runtime \
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/${API_VERSION}/aws-custom-runtime-linux-amd64 > aws-custom-runtime \
&& chmod +x aws-custom-runtime

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

COPY --from=0 /var/runtime/lib /opt
RUN mv /opt/runtime.rb /opt/bootstrap
RUN sed -i /opt/lambda_server.rb -e 's|http://127.0.0.1:9001/2018-06-01|http://127.0.0.1/2018-06-01|'
RUN sed -i /opt/lambda_server.rb -e 's|http://127.0.0.1:9001/2018-06-01|http://127.0.0.1/2018-06-01|'

0 comments on commit bee0b3c

Please sign in to comment.