Skip to main content

Reusable PHP CI Docker image

php-ci

Pull one image, run your test suite. PHP 8.1–8.4 and Composer 2 are already inside — skip setup-php and long apt-get install blocks in every pipeline.

  • GitHub Actions
  • GitLab CI
  • Bitbucket
  • TYPO3
  • Laravel
# 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

Use as a job container — no setup-php step. Migrating from setup-php?

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 PHPUnit, PHPStan and friends via Composer, then run ./vendor/bin/*. See the PHPStan guide to get started.

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

TYPO3

Run unit and functional tests with SQLite, MySQL or PostgreSQL. The database drivers and common prerequisites are already in the image. Use :8.4-deploy for rsync-based deploy jobs.

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 →

Supported Versions

PHP versionImage tagStatus
PHP 8.4himanshuramavat/php-ci:8.4 Active — newest
PHP 8.4 deployhimanshuramavat/php-ci:8.4-deploy Opt-in — rsync + SSH
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

Ready in under a minute

New to php-ci? Start with the Quick Start guide, or jump straight to your CI provider and framework docs.

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 →