A PHP 8.4.21 CLI Docker image with browser support, Composer, Pantheon Terminus, and Xdebug for local development and CI/CD workflows.
- Base Image: Official
php:8.4.21-cli - Browser Support:
google-chrome-stableonamd64chromiumfallback on non-amd64architectures
- PHP Tooling: Composer 2 and Xdebug
- Pantheon Tooling: Terminus
4.3.1 - Container Working Directory:
/app
To build the Docker image locally:
docker build -t pantheon-drupal-ci:latest .On Apple Silicon, if you specifically want Google Chrome instead of the Chromium fallback, build for amd64:
docker buildx build --platform linux/amd64 -t pantheon-drupal-ci:latest .docker run --rm pantheon-drupal-ci:latest php -v
docker run --rm pantheon-drupal-ci:latest composer --version
docker run --rm pantheon-drupal-ci:latest terminus --version
docker run --rm pantheon-drupal-ci:latest php -m | grep -i xdebug
docker run --rm pantheon-drupal-ci:latest google-chrome --versionThe php -v output should report PHP 8.4.21.
This image is automatically built and pushed to GitHub Container Registry (GHCR) on every push to the main branch.
docker pull ghcr.io/YOUR_USERNAME/pantheon-drupal-ci-build:latestThe GitHub Actions workflow (docker-build-push.yml) handles:
- Building the Docker image on pushes to
mainand pull requests - Pushing to GHCR for pushes to
main - Automatic tagging with:
- Branch names
- Latest tag for main branch
- Git SHA for traceability
- Semantic versioning (when using git tags)
The workflow uses GITHUB_TOKEN for authentication to GHCR. No additional configuration is needed - GitHub automatically provides this token for actions running in your repository.
- Working Directory:
/app - Composer Binary:
/usr/local/bin/composer - Terminus Binary:
/usr/local/bin/terminus - Xdebug Config:
/usr/local/etc/php/conf.d/99-xdebug.ini
Edit the Dockerfile to add or modify:
- Additional PHP extensions (via
peclordocker-php-ext-install) - Browser packages and architecture handling
- Terminus version via
TERMINUS_VERSION - Composer, Xdebug, and other CLI tooling