This is a tool to develop, build and test PHP extensions in Docker containers.

Overview

Develop, Build and Test PHP Extensions

This is a tool to develop, build and test PHP extensions in Docker containers.

Installation

Clone this repository and add the bin/ directory of this repository to your $PATH.

Usage

Call the build-php-extension from the root directory of your extension source. The directory must contain your config.m4 file.

The build-php-extension command has multiple subcommands.

To configure and build your extension, run:

build-php-extension configure

To trigger a build, you can run:

build-php-extension build

And to run the tests, you need to execute:

build-php-extension test

You can specify the tests which should be executed as parameters to the test command. If you omit the list of tests, all tests are run.

build-php-extension test tests/my_test_*.phpt

You can specify the minor PHP version which should be used, whether to enable thread-safety (--zts) and the build mode (--release or --debug) as arguments to all commands:

build-php-extension --php-version 7.4 --release --zts build

The default is to disable thread safety and to build in debug mode.

To open an interactive shell inside a Docker container, you can execute:

build-php-extension shell

The dist-clean subcommand can be used to clean all generated files from the build directory:

build-php-extension dist-clean

Status information is stored by the tool in the file .build-php-extension.state.ini inside the source code of your extension. You should add this file to your .gitignore.

Rebuild Docker Image

When you first execute a command in one specific configuration, the Docker image for that configuration will automatically be built. When you call commands with the same configuration later on, that Docker image will be reused. You can manually rebuild the Docker image with the following command:

build-php-extension --php-version 8.0 --debug build-image

Customization

You can customize the behavior of the build using various hooks. These are scripts that are sourced at the respective steps of the build process. These are the available extension points:

  • build-hooks/pre-configure.sh
  • build-hooks/post-configure.sh
  • build-hooks/pre-build.sh
  • build-hooks/post-build.sh
  • build-hooks/pre-test.sh
  • build-hooks/post-test.sh
  • build-hooks/pre-clean-build-directory.sh
  • build-hooks/post-clean-build-directory.sh
  • build-hooks/pre-shell.sh

If the file build-hooks/configure exists and is executable, it is executed instead of calling ./configure directly. This can be used to pass additional flags to ./configure. All command-line-arguments that script receives, should be forwarded to ./configure:

#!/bin/sh

set -eu
./configure --my-special-configure-flag "${@}"
Owner
Suora GmbH
Suora GmbH
A Python library for the Docker Engine API

Docker SDK for Python A Python library for the Docker Engine API. It lets you do anything the docker command does, but from within Python apps – run c

Docker 6.1k Dec 31, 2022
Phonebook application to manage phone numbers

PhoneBook Phonebook application to manage phone numbers. How to Use run main.py python file. python3 main.py Links Download Source Code: Click Here M

Mohammad Dori 3 Jul 15, 2022
Official Python client library for kubernetes

Kubernetes Python Client Python client for the kubernetes API. Installation From source: git clone --recursive https://github.com/kubernetes-client/py

Kubernetes Clients 5.4k Jan 02, 2023
CDK Template of Table Definition AWS Lambda for RDB

CDK Template of Table Definition AWS Lambda for RDB Overview This sample deploys Amazon Aurora of PostgreSQL or MySQL with AWS Lambda that can define

AWS Samples 5 May 16, 2022
Utilitaire de contrôle de Kubernetes

Utilitaire de contrôle de Kubernetes ** What is this ??? ** Every time we use a word in English our manager tells us to use the French translation of

Théophane Vié 9 Dec 03, 2022
Organizing ssh servers in one shell.

NeZha (哪吒) NeZha is a famous chinese deity who can have three heads and six arms if he wants. And my NeZha tool is hoping to bring developer such mult

Zilin Zhu 8 Dec 20, 2021
SSH tunnels to remote server.

Author: Pahaz Repo: https://github.com/pahaz/sshtunnel/ Inspired by https://github.com/jmagnusson/bgtunnel, which doesn't work on Windows. See also: h

Pavel White 1k Dec 28, 2022
A lobby boy will create a VPS server when you need one, and destroy it after using it.

Lobbyboy What is a lobby boy? A lobby boy is completely invisible, yet always in sight. A lobby boy remembers what people hate. A lobby boy anticipate

226 Dec 29, 2022
CTF infrastructure deployment automation tool.

CTF infrastructure deployment automation tool. Focus on the challenges. Mirrored from

Fake News 1 Apr 12, 2022
Deploying a production-ready Django project using Nginx and Gunicorn

django-nginx-gunicorn This project is for deploying a production-ready Django project using Nginx and Gunicorn. Running a local server of Django is no

Arash Sayareh 8 Jul 03, 2022
A Python Implementation for Git for learning

A pure Python implementation for Git based on Buliding Git

shidenggui 42 Jul 13, 2022
Manage your azure VM easily!

Azure-manager Manage your VM in Azure using cookies.

Team 1injex 129 Dec 17, 2022
Ingress patch example by Kustomize

Ingress patch example by Kustomize

Jinu 10 Nov 14, 2022
Flexible and scalable monitoring framework

Presentation of the Shinken project Welcome to the Shinken project. Shinken is a modern, Nagios compatible monitoring framework, written in Python. It

Gabès Jean 1.1k Dec 18, 2022
pyinfra automates infrastructure super fast at massive scale. It can be used for ad-hoc command execution, service deployment, configuration management and more.

pyinfra automates/provisions/manages/deploys infrastructure super fast at massive scale. It can be used for ad-hoc command execution, service deployme

Nick Barrett 2.1k Dec 29, 2022
Bitnami Docker Image for Python using snapshots for the system packages repositories

Python Snapshot packaged by Bitnami What is Python Snapshot? Python is a programming language that lets you work quickly and integrate systems more ef

Bitnami 1 Jan 13, 2022
A system for managing CI data for Mozilla projects

Treeherder Description Treeherder is a reporting dashboard for Mozilla checkins. It allows users to see the results of automatic builds and their resp

Mozilla 235 Dec 22, 2022
sysctl/sysfs settings on a fly for Kubernetes Cluster. No restarts are required for clusters and nodes.

SysBindings Daemon Little toolkit for control the sysctl/sysfs bindings on Kubernetes Cluster on the fly and without unnecessary restarts of cluster o

Wallarm 19 May 06, 2022
This project shows how to serve an TF based image classification model as a web service with TFServing, Docker, and Kubernetes(GKE).

Deploying ML models with CPU based TFServing, Docker, and Kubernetes By: Chansung Park and Sayak Paul This project shows how to serve a TensorFlow ima

Chansung Park 104 Dec 28, 2022