Add Docker build environment for KiCad WASM
- Add Dockerfile with ARM64-native emscripten/emsdk:4.0.2-arm64 image - Add docker-compose.yml with resource limits (10 CPUs, 16GB RAM) - Add helper scripts (build.sh, shell.sh, entrypoint.sh) - Add Docker README with usage instructions - Update playwright.config.ts to find free port dynamically - Add .dockerignore and .gitignore entries for build artifacts The Docker environment provides reproducible builds with: - Named volume for build cache (faster I/O on macOS) - Resource limits to prevent system lockups - Interactive shell access for debugging 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
c408410c7d
commit
b5e46a0aba
9 changed files with 262 additions and 3 deletions
19
docker/build.sh
Executable file
19
docker/build.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
# Build KiCad WASM inside Docker container
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Start container if not running
|
||||
docker compose -f docker/docker-compose.yml up -d
|
||||
|
||||
# Run build command
|
||||
docker compose -f docker/docker-compose.yml exec kicad-wasm-builder \
|
||||
/workspace/scripts/kicad/build-pcbnew.sh "$@"
|
||||
|
||||
# Copy output to host-accessible directory
|
||||
echo "Copying build output to ./output/..."
|
||||
docker compose -f docker/docker-compose.yml exec kicad-wasm-builder \
|
||||
bash -c "mkdir -p /workspace/output && cp -r /workspace/build-wasm/kicad-pcbnew/bin/* /workspace/output/ 2>/dev/null || true"
|
||||
|
||||
echo "Build complete. Output files in ./output/"
|
||||
Loading…
Reference in a new issue