mirror of
https://github.com/php/pie.git
synced 2026-03-23 23:12:17 +01:00
Added barebones structure of building with Static PHP
This commit is contained in:
8
spc/.gitignore
vendored
Normal file
8
spc/.gitignore
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
buildroot
|
||||
downloads
|
||||
log
|
||||
pkgroot
|
||||
source
|
||||
pie.elf
|
||||
pie.phar
|
||||
spc
|
||||
22
spc/build.sh
Executable file
22
spc/build.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -xeuo pipefail
|
||||
|
||||
SPC_ROOT=$(dirname "$0")
|
||||
|
||||
# First up, build the regular pie.phar
|
||||
cd "$SPC_ROOT/.."
|
||||
php box.phar compile
|
||||
mv pie.phar "$SPC_ROOT/pie.phar"
|
||||
|
||||
cd $SPC_ROOT
|
||||
|
||||
# Build the static PHP micro.sfx
|
||||
./spc craft
|
||||
|
||||
# Combine pie.phar with the micro.sfx
|
||||
./spc micro:combine pie.phar --output=pie.elf
|
||||
|
||||
# Docker build & run the test with it
|
||||
docker build --file spc.Dockerfile --tag pie-spc-test .
|
||||
docker run --rm -ti pie-spc-test
|
||||
5
spc/craft.yml
Normal file
5
spc/craft.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
php-version: 8.4
|
||||
extensions: "curl,filter,iconv,openssl,phar,zlib"
|
||||
sapi: micro
|
||||
download-options:
|
||||
prefer-pre-built: true
|
||||
11
spc/spc.Dockerfile
Normal file
11
spc/spc.Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
||||
# docker build --file spc.Dockerfile --tag pie-spc-test .
|
||||
# docker run --rm -ti pie-spc-test
|
||||
FROM php:7.4-cli
|
||||
|
||||
# need
|
||||
RUN apt-get update && \
|
||||
apt-get install -y git
|
||||
|
||||
COPY pie.elf /usr/bin/pie
|
||||
|
||||
CMD ["pie", "install", "asgrim/example-pie-extension"]
|
||||
Reference in New Issue
Block a user