Skip to content

Commit 9f2ae73

Browse files
authored
Add lambda node 14 image (#64)
1 parent adf38b2 commit 9f2ae73

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

14-lambda/Dockerfile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM amazon/aws-lambda-nodejs:14
2+
3+
ENV AWS_DEFAULT_REGION us-east-1
4+
ENV SERVICE_ROOT /service
5+
ENV SERVICE_USER service
6+
ENV SHELL bash
7+
8+
ENV AWS_SDK_VERSION 2.585.0
9+
ENV YARN_VERSION 1.19.2
10+
11+
RUN npm i -g \
12+
aws-sdk@$AWS_SDK_VERSION \
13+
node-gyp \
14+
yarn@$YARN_VERSION
15+
16+
ADD https://raw.githubusercontent.com/articulate/docker-consul-template-bootstrap/master/install.sh /tmp/consul_template_install.sh
17+
RUN bash /tmp/consul_template_install.sh && rm /tmp/consul_template_install.sh
18+
19+
RUN yum -y install shadow-utils && yum clean all
20+
RUN /usr/sbin/groupadd $SERVICE_USER && /usr/sbin/useradd --create-home --home $SERVICE_ROOT --gid $SERVICE_USER --shell /bin/bash $SERVICE_USER
21+
WORKDIR $SERVICE_ROOT
22+
23+
ADD https://raw.githubusercontent.com/articulate/docker-consul-template-bootstrap/master/wait-for-it.sh /wait-for-it.sh
24+
RUN chmod a+rx /wait-for-it.sh
25+
26+
COPY entrypoint-lambda.sh /
27+
ENTRYPOINT ["/entrypoint-lambda.sh"]

14-lambda/entrypoint-lambda.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash -e
2+
npm link aws-sdk
3+
/entrypoint.sh "$@"

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
all: lambda stretch-slim
22

3-
lambda: build_10-lambda build_12-lambda
3+
lambda: build_10-lambda build_12-lambda build_14-lambda
44

55
stretch-slim: build_10-stretch-slim build_12-stretch-slim build_14-stretch-slim
66

@@ -10,6 +10,9 @@ build_10-lambda:
1010
build_12-lambda:
1111
docker build -t local/articulate-node:12-lambda 12-lambda/
1212

13+
build_14-lambda:
14+
docker build -t local/articulate-node:14-lambda 14-lambda/
15+
1316
build_10-stretch-slim:
1417
docker build -t local/articulate-node:10-stretch-slim 10-stretch-slim/
1518

0 commit comments

Comments
 (0)