Skip to content

Commit 3921c8d

Browse files
committed
adapted with Joel tips
1 parent 9c3c815 commit 3921c8d

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

bin/deploy.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ os=$(uname -s)
4848
if [ "$os" == "Darwin" ]; then
4949
(
5050
cd lambdas/resize
51-
rm -rf package lambda.zip
52-
docker build -t lambda-builder .
53-
docker run --name lambda-container -v .:/output lambda-builder
54-
docker cp lambda-container:/lambda.zip ./lambda.zip
51+
rm -rf libs lambda.zip
52+
docker run --platform linux/x86_64 -v "$PWD":/var/task "public.ecr.aws/sam/build-python3.9" /bin/sh -c "pip install -r requirements.txt -t libs; exit"
53+
cd libs && zip -r ../lambda.zip . && cd ..
54+
zip lambda.zip handler.py
55+
rm -rf libs
5556
)
5657
else
5758
(

lambdas/resize/Dockerfile

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)