Skip to content

Commit 4c81a80

Browse files
author
Davide Melfi
committed
build: add a checke that docker exist in the current environment to
build jni code
1 parent 7946ec4 commit 4c81a80

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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)