Creates php extension placeholder (skeleton) for extension development using docker build
This is an initial description. For now the it creates c php skeleton for php 8.2.22 using debian 12 OS image.
Based on dockerfile, it creates a multi-stage docker build stages as fallows :
essential: based on debian:12 image, installs required packagesphp-clone: based on essential, clones php repository git target branch with php requested versionphp-build: based on php-clone, builds phpext-copy: based on php-build, copy c php extension code from SOURCE_FOLDERext-create: based on php-build, c php extension code skeletonext-build: based on ext-create or ext-copy, builds the extensionext-test: based on ext-build, tests the extensionfinal: based on ext-test, copy the extension code to SOURCE_FOLDER
- Docker
- Bash
./build.shPossible Arguments :
PHPVERSION=8.2.22: set you php version. supports 7+. Default : 8.2.22ACTION=create: create php extension skeleton on build. Default : createACTION=copy: copy php extension source folder fromSOURCE_FOLDERduring build. Default : createEXTENSION_NAME=test: extension name. Default : testSOURCE_FOLDER=src: source folder of extension to output/input. Default : src--[docker-build-argument-name]: any docker build argument like--no-cacheor--no-cache-filter ext-build
Example :
./build.sh PHPVERSION=8.3.10 --no-cache-filter ext-build