Skip to main content

php-ci

Production-ready reusable PHP CI Docker image

Built for TYPO3, Laravel and modern PHP projects.

# Pull the image
$ docker pull himanshuramavat/php-ci:8.3

# Run your test suite
$ docker run --rm -v "$(pwd):/app" -w /app himanshuramavat/php-ci:8.3 ./vendor/bin/phpunit

PHP 8.1 – 8.4

Every supported PHP minor line as its own pinnable tag. Run the same job matrix across :8.1, :8.2, :8.3 and :8.4.

Composer 2 built in

Composer 2 is preinstalled and tuned for non-interactive CI, with cache directory overrides for fast, repeatable dependency installs.

CI/CD ready

Extensions and tools are baked in, so jobs spend their time testing — not running apt-get install on every pipeline.

GitHub Actions friendly

Drop it in as a job container — no setup-php step. Works identically on GitLab CI and Bitbucket Pipelines.

TYPO3 testing

Includes the database drivers (including SQLite) and common extensions TYPO3 unit and functional tests expect out of the box.

PHPUnit & quality tools

Install project-level QA tools (PHPUnit, PHPStan, etc.) via Composer and run them from ./vendor/bin for reproducible pipelines.

Quick Start

Pull the image and run your suite in one line — no PHP setup on the host.

# Pull a specific PHP version
docker pull himanshuramavat/php-ci:8.3

# Install dependencies and run tests
docker run --rm -v "$(pwd):/app" -w /app himanshuramavat/php-ci:8.3 bash -c "composer install --no-interaction && ./vendor/bin/phpunit"

Supported Versions

PHP versionImage tagStatus
PHP 8.4himanshuramavat/php-ci:8.4 Active — newest
PHP 8.3himanshuramavat/php-ci:8.3 (:latest) Active — recommended
PHP 8.2himanshuramavat/php-ci:8.2 Security fixes
PHP 8.1himanshuramavat/php-ci:8.1 Security fixes

TYPO3

Run unit and functional tests with SQLite, MySQL or PostgreSQL. The database drivers and common prerequisites are already in the image.

TYPO3 guide →

Laravel

Run php artisan test, PHPUnit or Pest against an in-memory SQLite database or a MySQL service — every extension Laravel needs is enabled out of the box.

Laravel guide →

GitHub Actions in seconds

A complete, working workflow — checkout, install, test. No setup-php step required.

.github/workflows/ci.yml
name: CI
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
container:
image: himanshuramavat/php-ci:8.3
steps:
- uses: actions/checkout@v4
- run: composer install --no-interaction --no-progress --prefer-dist
- run: ./vendor/bin/phpunit

Join the community

Contributing

Found a bug or want a new extension? Here's how to help.

Contributing guide →

Code of Conduct

We follow the Contributor Covenant. Be kind and constructive.

Read it →

Security

Report vulnerabilities privately via GitHub Security.

Security policy →