Skip to content

Commit 7009128

Browse files
committed
build: add a checke that docker exist in the current environment to
build jni code
1 parent a7c2b1c commit 7009128

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,19 @@ experimental/aws-lambda-java-profiler/integration_tests/helloworld/bin
3838
.vscode
3939
.kiro
4040
build
41+
<<<<<<< HEAD
42+
=======
43+
44+
# Logs
45+
*.log
46+
47+
# Maven flatten plugin
48+
.flattened-pom.xml
49+
50+
# Vim swap files
51+
*.swp
52+
*.swo
53+
54+
# Tool version manager
55+
>>>>>>> 45b43fe (chore: adding other files to .gitignore)
4156
mise.toml

aws-lambda-java-runtime-interface-client/src/main/jni/build-jni-lib.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33

44
set -euo pipefail
55

6+
# Check if Docker is available and running. This works regardless of how Docker
7+
# is configured (Unix socket, TCP, Docker Desktop, Colima, Rancher, etc.)
8+
if ! docker info >/dev/null 2>&1; then
9+
echo "WARNING: Docker is not available. Skipping JNI native library build."
10+
echo "The native .so libraries will not be included in the build artifacts."
11+
echo "This is fine for local development and running unit tests."
12+
echo "To build the native libraries, ensure Docker is installed and running."
13+
exit 0
14+
fi
15+
616
SRC_DIR=$(dirname "$0")
717
DST_DIR=${1}
818
MULTI_ARCH=${2}

0 commit comments

Comments
 (0)