production-ready image for Laravel, Symfony, and CodeIgniter, as well as custom PHP projects.
250

Production-ready PHP 8.2 Apache image optimized for Laravel, Symfony, and CodeIgniter. Includes essential extensions (PDO, MySQLi, GD, Zip) and enabled mod_rewrite. Features a configurable document root for flexible deployment of both modern and legacy applications. Multi-arch support (amd64/arm64).
This is a versatile, production-ready Docker image for PHP 8.2 applications running on Apache. It is pre-configured to support major PHP frameworks like Laravel, Symfony, and CodeIgniter, as well as custom PHP projects.
php:8.2-apache.pdo, pdo_mysql, mysqli (database support)gd (image processing)zip (archive management)mod_rewrite enabled (essential for framework routing).Modern frameworks like Laravel and Symfony usually serve files from a public/ subdirectory. This image defaults to /var/www/html/public to support this out of the box.
Run the following command in your project root:
docker run -d \
-p 80:80 \
-v $(pwd):/var/www/html \
--name my-laravel-app \
kkmadhpuriya/php-laravel-codeigniter-symfony:8.2
-v $(pwd):/var/www/html: Mounts your current directory (host) to the container's web root.index.php in $(pwd)/public.If your project's entry point is in the root directory (typical for CodeIgniter, older frameworks, or simple PHP scripts), you need to change the Document Root.
Override the APACHE_DOCUMENT_ROOT environment variable:
docker run -d \
-p 80:80 \
-v $(pwd):/var/www/html \
-e APACHE_DOCUMENT_ROOT=/var/www/html \
--name my-php-app \
kkmadhpuriya/php-laravel-codeigniter-symfony:8.2
-e APACHE_DOCUMENT_ROOT=/var/www/html: Tells Apache to serve files directly from the mounted root, not the public subdirectory.You can pass additional environment variables or mount custom configuration files if needed.
mysqlipdopdo_mysqlgd (with Freetype and JPEG support)zipIf you want to build and push your own version of this image:
Essential if you are building on a Mac (M1/M2) for a production server.
docker build --platform linux/amd64 -t <user-name>/php-laravel-codeigniter-symfony:v1 .
docker push <user-name>/php-laravel-codeigniter-symfony:v1
Content type
Image
Digest
sha256:31a12a694…
Size
190.3 MB
Last updated
9 months ago
docker pull kkmadhpuriya/php-laravel-codeigniter-symfony:8.2