Custom Docker Image for Apache and PHP 8.2 with Composer & Extensions
420
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ā
php:8.2-apache.htaccess and mod_rewrite enabledpdo, pdo_mysql, mysqlizip, gd (with freetype and jpeg support)imagick (via PECL)rewrite, cgi, headersindex.php and info.php files includedStandard build:
docker build -t luri/php-apache .
Multi-architecture build:
docker buildx build --platform linux/amd64,linux/arm64 -t luri/php-apache:multiarch .
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
files/index.php ā Default welcome pagefiles/info.php ā PHP info pagefiles/apache/apache-vhost.conf.htaccess enabled globally via AllowOverride AllServerName set to localhost to prevent warnings80amd64, arm64docker-compose.yml
services:
web:
build:
context: .
image: luri/php-apache
environment:
- PORT
ports:
- "${PORT}:80"
env_file:
- .env
Content type
Image
Digest
sha256:f6935cc32ā¦
Size
286.2 MB
Last updated
over 1 year ago
docker pull luri/php-apache