# mlocati/docker-php-extension-installer

Easily install PHP extensions in Docker containers

Repository: https://github.com/mlocati/docker-php-extension-installer
Canonical: https://ross.abutalabs.com/products/docker-php-extension-installer
Language: Shell
License: MIT
License Family: permissive
Topics: docker, php, extension, install
Last push: 2026-08-26T12:09:27+00:00

## Health v2 (maintenance only)
Score: 92/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 77, longevity 100
- inputs: {"age_days": 3066, "days_push": 7, "days_rel": 77, "gap_med": 2, "n_releases_24m": 124}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4962, forks 434 (observed 2026-08-28T04:09:03.920538+00:00)

## What it is
A shell script that simplifies installing PHP extensions inside official PHP Docker images. It automatically resolves and installs required APT/APK packages and cleans them up afterward to keep images small.

## Use cases
- install PHP extensions in a Dockerfile
- add gd and xdebug to a php docker image
- build a slim PHP docker image with extensions
- install PHP extensions on Alpine-based images
- avoid manually installing PHP extension dependencies in Docker

## When to choose
- You use official PHP Docker images (Debian or Alpine based) and need extensions
- You want minimal image size with automatic dependency cleanup
- You want a one-line solution in your Dockerfile

## When to avoid
- You don't use Docker for your PHP setup
- You need extensions on non-official PHP images or non-Linux platforms
- You require fully pinned, auditable builds without downloading scripts at build time

## Facets
- artifact type: cli-tool
- maturity: active
- function: developer-tools, build-tool, deployment
- domain: developer-tools
- platform: cli
- tags: php, docker-images, php-extensions, dockerfile, shell-script, devops, containers, docker, linux

## Member repositories
- mlocati/docker-php-extension-installer (main) score 92

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:03.920538+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:17:47.646001+00:00, confidence not recorded.
  - readme: https://github.com/mlocati/docker-php-extension-installer (fetched 2026-08-28T04:09:03.920538+00:00, sha fb51e96640fb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
