Sign inSign up

luri/php-apache

By luri

•Updated over 1 year ago

Custom Docker Image for Apache and PHP 8.2 with Composer & Extensions

Image
Developer tools
Web servers
0

420

luri/php-apache repository overview

⁠🐳 Custom Docker Image for Apache and PHP 8.2 with Composer & Extensions

A custom Docker image based on php:8.2-apache, pre-configured with essential PHP extensions, Apache modules, and Composer — ready for development or production use.

šŸ“¦ Base Image: php:8.2-apache
šŸ“ Source Code: GitHub Repository⁠


ā āœ… Features

  • Based on official php:8.2-apache
  • .htaccess and mod_rewrite enabled
  • Composer installed globally
  • Included PHP extensions:
    • pdo, pdo_mysql, mysqli
    • zip, gd (with freetype and jpeg support)
    • imagick (via PECL)
  • Apache modules: rewrite, cgi, headers
  • Default index.php and info.php files included

ā šŸ— Build Instructions

Standard build:

docker build -t luri/php-apache .

Multi-architecture build:

docker buildx build --platform linux/amd64,linux/arm64 -t luri/php-apache:multiarch .

ā šŸš€ Usage

Run the container:

docker run -d -p 8080:80 luri/php-apache

Access your application at: http://localhost:8080⁠


Running to shell:

 docker run -it --rm --name apache luri/php-apache bash

Running with docker compose:

 docker compose up

ā šŸ“ Included Files

  • files/index.php – Default welcome page
  • files/info.php – PHP info page
  • (Optional) Custom Apache virtual host config: files/apache/apache-vhost.conf

ā āš™ļø Configuration Notes

  • .htaccess enabled globally via AllowOverride All
  • Apache ServerName set to localhost to prevent warnings

ā šŸ“Œ Info

  • Default port: 80
  • Supported platforms: amd64, arm64
  • Suitable for PHP web app development and lightweight production use

⁠🐳 Example: docker-compose.yml


services:
  web:
    build:
      context: .
    image: luri/php-apache
    environment:
      - PORT
    ports:
      - "${PORT}:80"
    env_file:
      - .env

Tag summary

Content type

Image

Digest

sha256:f6935cc32…

Size

286.2 MB

Last updated

over 1 year ago

docker pull luri/php-apache