PHP Docker Image
Overview
This docker image is a minimal, production-ready PHP runtime built on top of Alpine Linux and the official PHP base images. It is designed to provide a clean, predictable, and lightweight PHP environment suitable for both local development and automated build pipelines.
The image comes with a curated set of commonly used PHP extensions and sensible default configuration, allowing developers to run modern PHP applications without spending time on repetitive environment setup. By prioritizing small image size, fast startup times, and compatibility with Composer-based workflows, it enables consistent PHP execution across development, staging, and production environments.
Usage
Quickly run PHP commands without installing PHP locally:
docker run -it --rm ghcr.io/awesoft/php:8.4 php -v
Mount your current working directory into the container for local development:
docker run -it --rm -v $(pwd):/app ghcr.io/awesoft/php:8.4
This allows you to execute Composer commands, run scripts, or test applications using the same PHP environment across all machines.