Browse Source

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
pull/7526/head
chrislu 7 days ago
parent
commit
9e8b8276ea
  1. 5
      .github/workflows/spark-integration-tests.yml

5
.github/workflows/spark-integration-tests.yml

@ -48,12 +48,13 @@ jobs:
- name: Build SeaweedFS binary - name: Build SeaweedFS binary
run: | run: |
echo "Building SeaweedFS binary..."
echo "Building SeaweedFS binary (statically linked for Alpine)..."
cd weed cd weed
go build -o ../docker/weed
CGO_ENABLED=0 go build -o ../docker/weed
cd ../docker cd ../docker
# Dockerfile.local expects these files in the build context # Dockerfile.local expects these files in the build context
ls -la weed filer.toml entrypoint.sh ls -la weed filer.toml entrypoint.sh
file weed
echo "✓ SeaweedFS binary built and ready for Docker build" echo "✓ SeaweedFS binary built and ready for Docker build"
- name: Build SeaweedFS Java dependencies - name: Build SeaweedFS Java dependencies

Loading…
Cancel
Save