Skip to content
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

Add lambda node 14 image #64

Merged
merged 1 commit into from
Aug 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions 14-lambda/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM amazon/aws-lambda-nodejs:14

ENV AWS_DEFAULT_REGION us-east-1
ENV SERVICE_ROOT /service
ENV SERVICE_USER service
ENV SHELL bash

ENV AWS_SDK_VERSION 2.585.0
ENV YARN_VERSION 1.19.2

RUN npm i -g \
aws-sdk@$AWS_SDK_VERSION \
node-gyp \
yarn@$YARN_VERSION

ADD https://raw.githubusercontent.com/articulate/docker-consul-template-bootstrap/master/install.sh /tmp/consul_template_install.sh
RUN bash /tmp/consul_template_install.sh && rm /tmp/consul_template_install.sh

RUN yum -y install shadow-utils && yum clean all
RUN /usr/sbin/groupadd $SERVICE_USER && /usr/sbin/useradd --create-home --home $SERVICE_ROOT --gid $SERVICE_USER --shell /bin/bash $SERVICE_USER
WORKDIR $SERVICE_ROOT

ADD https://raw.githubusercontent.com/articulate/docker-consul-template-bootstrap/master/wait-for-it.sh /wait-for-it.sh
RUN chmod a+rx /wait-for-it.sh

COPY entrypoint-lambda.sh /
ENTRYPOINT ["/entrypoint-lambda.sh"]
3 changes: 3 additions & 0 deletions 14-lambda/entrypoint-lambda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash -e
npm link aws-sdk
/entrypoint.sh "$@"
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
all: lambda stretch-slim

lambda: build_10-lambda build_12-lambda
lambda: build_10-lambda build_12-lambda build_14-lambda

stretch-slim: build_10-stretch-slim build_12-stretch-slim build_14-stretch-slim

Expand All @@ -10,6 +10,9 @@ build_10-lambda:
build_12-lambda:
docker build -t local/articulate-node:12-lambda 12-lambda/

build_14-lambda:
docker build -t local/articulate-node:14-lambda 14-lambda/

build_10-stretch-slim:
docker build -t local/articulate-node:10-stretch-slim 10-stretch-slim/

Expand Down