From 9e8b8276ea9770ff5bac26d93b900bd3e3c190e2 Mon Sep 17 00:00:00 2001 From: chrislu Date: Sat, 22 Nov 2025 13:57:40 -0800 Subject: [PATCH] fix: build statically linked binary for Alpine Linux - Add CGO_ENABLED=0 to go build command - Creates statically linked binary compatible with Alpine (musl libc) - Fixes 'not found' error caused by missing glibc dynamic linker - Add file command to verify static linking in build output --- .github/workflows/spark-integration-tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/spark-integration-tests.yml b/.github/workflows/spark-integration-tests.yml index 9896221da..efa29184a 100644 --- a/.github/workflows/spark-integration-tests.yml +++ b/.github/workflows/spark-integration-tests.yml @@ -48,12 +48,13 @@ jobs: - name: Build SeaweedFS binary run: | - echo "Building SeaweedFS binary..." + echo "Building SeaweedFS binary (statically linked for Alpine)..." cd weed - go build -o ../docker/weed + CGO_ENABLED=0 go build -o ../docker/weed cd ../docker # Dockerfile.local expects these files in the build context ls -la weed filer.toml entrypoint.sh + file weed echo "✓ SeaweedFS binary built and ready for Docker build" - name: Build SeaweedFS Java dependencies