Skip to content
This repository was archived by the owner on Feb 20, 2023. It is now read-only.

Commit 895ff42

Browse files
committed
Add libjpeg.so binaries to the deploy package
1 parent 455e9b3 commit 895ff42

File tree

3 files changed

+131
-133
lines changed

3 files changed

+131
-133
lines changed

.gitignore

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,12 @@ $RECYCLE.BIN/
117117
# Windows shortcuts
118118
*.lnk
119119

120-
121120
# End of https://www.gitignore.io/api/osx,node,windows,visualstudiocode
122121

123-
# Package that is deployed to AWS Lambda
124-
deploy-package.zip
125122
coverage
123+
124+
# Package that is deployed to AWS Lambda
125+
*-deploy-package*.zip
126+
127+
# This should go only into the deploy package, not repo
128+
lib/*.so

.lambda-build-hook/post-build.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
# ------------------- BINARY SYSTEM LIBRARIES ------------------
4+
# Copy libjpeg which is missing in edge lambda runtime even
5+
# though it should be present in base Amazon Linux 2 filesystem.
6+
#
7+
# The library libjpeg-turbo is required for cwebp-bin package
8+
# and I found no way to provide it purely through npm /FS
9+
yum -y install libjpeg-turbo
10+
mkdir -pv "${LAMBDA_SHARED_LIB_DIR}"
11+
cp -v /usr/lib64/libjpeg.so.* "${LAMBDA_SHARED_LIB_DIR}"

0 commit comments

Comments
 (0)