File tree Expand file tree Collapse file tree 4 files changed +14
-10
lines changed
Expand file tree Collapse file tree 4 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 1+ 18.18.2
Original file line number Diff line number Diff line change 1- FROM public.ecr.aws/lambda/nodejs:12
1+ FROM public.ecr.aws/lambda/nodejs:18-x86_64
22
33ENV DOCKERIZED yes
4+ ENV PUPPETEER_CACHE_DIR /puppeteer-cache
45
56RUN yum install -y \
67 git gcc make gcc-c++ zlib-devel libjpeg-turbo-devel nasm automake autoconf libtool \
@@ -27,8 +28,9 @@ RUN yum install -y \
2728
2829ADD . /var/task
2930
30- RUN rm -rf node_modules && \
31+
32+ RUN mkdir -p /puppeteer-cache && rm -rf node_modules && \
3133 npm install jpegoptim-bin --unsafe-perm=true --allow-root && \
32- NODE_ENV=development && npm install --only=prod
34+ NODE_ENV=production && npm install --only=prod
3335
3436CMD [ "lambda.runner" ]
Original file line number Diff line number Diff line change @@ -5,26 +5,27 @@ DOCKER_IMAGE_TAG ?= latest
55RESULT_BUCKET_NAME ?= $(env ) -yellowlabtools-storage
66TEST_NAME ?= test-local
77TEST_URL ?= https://www.google.fr
8+ RUNNER_SUFFIX ?=
89
910all : install
1011
1112install :
1213 @npm install
1314
1415build-docker-image-lambda :
15- @docker build -f Dockerfile.lambda -t yellowlabtools-runner-lambda .
16+ @docker build -f Dockerfile.lambda -t yellowlabtools-runner$( RUNNER_SUFFIX ) -lambda .
1617
1718tag-docker-image-lambda :
18- @docker tag yellowlabtools-runner-lambda:$(DOCKER_IMAGE_TAG ) $(DOCKER_REGISTRY ) /yellowlabtools-runner-lambda:$(DOCKER_IMAGE_TAG )
19+ @docker tag yellowlabtools-runner$( RUNNER_SUFFIX ) -lambda:$(DOCKER_IMAGE_TAG ) $(DOCKER_REGISTRY ) /yellowlabtools-runner$( RUNNER_SUFFIX ) -lambda:$(DOCKER_IMAGE_TAG )
1920
2021push-docker-image-lambda :
21- @docker push $(DOCKER_REGISTRY ) /yellowlabtools-runner-lambda:$(DOCKER_IMAGE_TAG )
22+ @docker push $(DOCKER_REGISTRY ) /yellowlabtools-runner$( RUNNER_SUFFIX ) -lambda:$(DOCKER_IMAGE_TAG )
2223
2324login-docker :
2425 @AWS_PROFILE=$(AWS_PROFILE ) aws ecr get-login-password --region $(AWS_REGION ) | docker login --username AWS --password-stdin $(DOCKER_REGISTRY )
2526
2627start-local-lambda :
27- @docker run --rm -it -p 9000:8080 -e RESULT_BUCKET_NAME=$(RESULT_BUCKET_NAME ) -e AWS_ACCESS_KEY_ID=$(AWS_ACCESS_KEY_ID ) -e AWS_SECRET_ACCESS_KEY=$(AWS_SECRET_ACCESS_KEY ) yellowlabtools-runner-lambda:$(DOCKER_IMAGE_TAG )
28+ @docker run --rm -it -p 9000:8080 -e RESULT_BUCKET_NAME=$(RESULT_BUCKET_NAME ) -e AWS_ACCESS_KEY_ID=$(AWS_ACCESS_KEY_ID ) -e AWS_SECRET_ACCESS_KEY=$(AWS_SECRET_ACCESS_KEY ) yellowlabtools-runner$( RUNNER_SUFFIX ) -lambda:$(DOCKER_IMAGE_TAG )
2829
2930run-local-test :
3031 @curl -XPOST " http://localhost:9000/2015-03-31/functions/function/invocations" -d ' {"id": "$(TEST_NAME)", "url": "$(TEST_URL)"}'
Original file line number Diff line number Diff line change 11{
22 "name" : " yellowlabtools-lambda-agent" ,
3- "version" : " 1 .0.0" ,
3+ "version" : " 3 .0.0" ,
44 "description" : " The AWS Lambda testing agent that's in use on https://yellowlab.tools" ,
55 "main" : " lambda.js" ,
66 "scripts" : {
1717 },
1818 "homepage" : " https://github.com/YellowLabTools/YellowLabTools-lambda-agent#readme" ,
1919 "dependencies" : {
20- "aws-sdk" : " 2.904 .0" ,
21- "yellowlabtools" : " 2.1.0 "
20+ "aws-sdk" : " ^2.1488 .0" ,
21+ "yellowlabtools" : " 3.0.1 "
2222 }
2323}
You can’t perform that action at this time.
0 commit comments