- Dockerfile.cross: builds static x86_64 musl binary from macOS via Docker - scripts/build-linux.sh: one-command cross-compilation - scripts/install-service.sh: systemd service with security hardening - Bump Rust Docker images to 1.86 for edition2024 support Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
18 lines
445 B
Bash
Executable File
18 lines
445 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build a static x86_64 Linux binary using Docker (works from macOS)
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
echo "=== Building x86_64 Linux binary via Docker ==="
|
|
DOCKER_BUILDKIT=1 docker build \
|
|
-f Dockerfile.cross \
|
|
--output type=local,dest=./dist \
|
|
.
|
|
|
|
ls -lh dist/btest
|
|
file dist/btest
|
|
echo ""
|
|
echo "Binary ready at: dist/btest"
|
|
echo "Copy to your server: scp dist/btest user@server:/usr/local/bin/btest"
|