Spike de validation : packaging du compiler Satellite en binaire unique via FrankenPHP.
- Docker (build multi-plateforme linux/amd64)
- Contexte de build : racine du monorepo (parent de
compiler/)
Depuis la racine du dépôt :
docker build -t satellite-frankenphp -f compiler/static-build.Dockerfile .docker cp $(docker create --name satellite-tmp satellite-frankenphp):/go/src/app/dist/frankenphp-linux-x86_64 satellite
docker rm satellite-tmp
chmod +x satelliteLe compiler est une CLI Symfony. Utiliser php-cli :
./satellite php-cli bin/satellite --help
./satellite php-cli bin/satellite build --output-dir /tmp/out .ls -lh satellite- Stage 1 (app-builder) : OK — Composer install avec
--ignore-platform-reqs, résolution des symlinks path. - Stage 2 (FrankenPHP) : Blocage — Le script
build-static.shéchoue sur./spc(static-php-cli) : téléchargement ou chemin incorrect dans l'imagedunglas/frankenphp:static-builder-gnu. - Contexte de build : Réduit à ~662 KB grâce au
.dockerignore(exclusion de vendor, node_modules, .git).
Une fois le binaire extrait, créer l'image minimale :
./compiler/build-minimal-image.sh ./satellite
# ou pour tester le Dockerfile sans binaire réel:
./compiler/build-minimal-image.shVoir aussi Dockerfile.minimal.