PHPackages                             ez-php/docker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. ez-php/docker

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

ez-php/docker
=============

Docker base image source and scaffolding stubs for ez-php modules and projects

1.0.1(1mo ago)01.7k↑268.6%20MITPHPPHP ^8.5CI passing

Since Mar 15Pushed 1mo agoCompare

[ Source](https://github.com/ez-php/docker)[ Packagist](https://packagist.org/packages/ez-php/docker)[ RSS](/packages/ez-php-docker/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (25)Used By (20)

ez-php/docker
=============

[](#ez-phpdocker)

Docker base image and scaffolding stubs for ez-php modules and projects.

---

Base Image (`au9500/php:8.5`)
-----------------------------

[](#base-image-au9500php85)

Central PHP runtime image published on Docker Hub. All ez-php modules use it as their base.

**Includes:**

- PHP 8.5 CLI
- Extensions: `pdo_mysql`, `mbstring`, `zip`, `intl`, `redis`, `pcov`, `xdebug`
- Composer 2
- Non-root user `sail` (UID/GID 1000, configurable via build args)
- Dev PHP config (`memory_limit = 512M`, `display_errors = On`, xdebug coverage mode)
- Default `container-start.sh`: runs `composer install` then `sleep infinity`

**Build locally:**

```
cd modules/docker
docker build -t au9500/php:8.5 .
```

**Build args:**

ArgDefaultDescription`WWWUSER``1000`UID for the `sail` user`WWWGROUP``1000`GID for the `sail` group---

Scaffolding (`composer require --dev ez-php/docker`)
----------------------------------------------------

[](#scaffolding-composer-require---dev-ez-phpdocker)

Scaffolds Docker setup for a new module or project by copying stub files into the project root.

### Usage

[](#usage)

```
composer require --dev ez-php/docker
vendor/bin/docker-init
```

Or via Composer script (add to your project's `composer.json`):

```
"scripts": {
    "docker:init": "php vendor/ez-php/docker/bin/docker-init"
}
```

```
composer docker:init
```

### What gets copied

[](#what-gets-copied)

Stub filePurpose`Dockerfile``FROM au9500/php:8.5` — minimal module image`docker-compose.yml`App service only`docker-compose.mysql.yml`MySQL service addon (merge as needed)`docker-compose.redis.yml`Redis service addon (merge as needed)`.env.example`Env var template`start.sh`Convenience script: copies `.env`, starts compose, opens shell`docker/db/create-db.sh`MySQL init script: creates main + testing databasesExisting files are never overwritten — safe to re-run after customisation.

### Updating existing Docker files

[](#updating-existing-docker-files)

When stubs change (e.g. new base image version, updated `start.sh`), run `update-docker` to sync existing files:

```
vendor/bin/update-docker            # apply updates
vendor/bin/update-docker --dry-run  # preview changes without writing
```

Files that do not yet exist in the target are skipped — use `docker-init` to add new files.

### `{{MODULE_NAME}}` placeholder

[](#module_name-placeholder)

The script reads the package name from `composer.json` and replaces all `{{MODULE_NAME}}` occurrences. For a package named `ez-php/cache`, it becomes `cache`, resulting in container names like `ez-php-cache-app`.

### Combining compose files

[](#combining-compose-files)

For a module that needs MySQL and Redis:

```
docker compose -f docker-compose.yml -f docker-compose.mysql.yml -f docker-compose.redis.yml up -d
```

Or merge the relevant services manually into `docker-compose.yml`.

---

Module Dockerfile after scaffolding
-----------------------------------

[](#module-dockerfile-after-scaffolding)

The generated `Dockerfile` is intentionally minimal:

```
FROM au9500/php:8.5

WORKDIR /var/www/html
```

All extensions, Composer, the `sail` user, and the default start script are baked into the base image. No `COPY` instructions needed for common infrastructure.

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance91

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

24

Last Release

47d ago

Major Versions

0.9.3 → 1.0.02026-03-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/a15a63c46d239d42b8ed4c2fe9adbc5fe99eb62f6e5bb90f08021e0c068e8b37?d=identicon)[AU9500](/maintainers/AU9500)

---

Top Contributors

[![AU9500](https://avatars.githubusercontent.com/u/122030400?v=4)](https://github.com/AU9500 "AU9500 (47 commits)")

### Embed Badge

![Health badge](/badges/ez-php-docker/health.svg)

```
[![Health](https://phpackages.com/badges/ez-php-docker/health.svg)](https://phpackages.com/packages/ez-php-docker)
```

###  Alternatives

[deployer/deployer

Deployment Tool

11.0k25.4M207](/packages/deployer-deployer)[appwrite/server-ce

End to end backend server for frontend and mobile apps.

55.3k84.2k](/packages/appwrite-server-ce)[pragmarx/health

Laravel Server &amp; App Health Monitor and Notifier

2.0k1.0M2](/packages/pragmarx-health)[felixfbecker/language-server-protocol

PHP classes for the Language Server Protocol

22476.7M6](/packages/felixfbecker-language-server-protocol)[heroku/heroku-buildpack-php

Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku

8161.3M10](/packages/heroku-heroku-buildpack-php)[tiamo/phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard

4674.7k](/packages/tiamo-phpas2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
