Sign inSign up

ltanh1194/deepworks-php-apache

By ltanh1194

•Updated 12 months ago

PHP 8.1 Apache image forked from official php:8.1-apache-bookworm

Image
Languages & frameworks
Developer tools
Web servers
0

72

ltanh1194/deepworks-php-apache repository overview

⁠Deepworks PHP 8.1 Apache Docker Image

Optimized PHP 8.1 with Apache image based on Debian Bookworm, designed for production environments with minimal footprint.

⁠Features

  • PHP 8.1 with Apache on Debian Bookworm
  • Multi-stage build for minimal image size
  • Multi-platform support: Compatible with both ARM64 (Apple Silicon) and AMD64 (Intel/Linux) architectures
  • Database support: MySQL/MariaDB (mysqli, pdo_mysql)
  • Internationalization: Full intl support
  • Image processing: ImageMagick integration via imagick extension
  • Compression utilities: zip/unzip support
  • Apache modules: rewrite and SSL enabled by default

⁠Quick Start

# Pull the image
docker pull ltanh1194/deepworks-php-apache:8.1

# Run a container
docker run -d -p 8080:80 -v /path/to/your/app:/var/www/html --name my-php-app ltanh1194/deepworks-php-apache:8.1

⁠Using with Docker Compose

version: '3'

services:
  php-apache:
    image: ltanh1194/deepworks-php-apache:8.1
    container_name: my-php-app
    ports:
      - "8080:80"
    volumes:
      - ./app:/var/www/html
      # Optional: Mount custom configurations
      - ./config/php/custom-php.ini:/usr/local/etc/php/conf.d/custom-php.ini
      - ./config/apache/000-default.conf:/etc/apache2/sites-available/000-default.conf
    restart: unless-stopped

⁠Custom Configuration

This image allows for easy customization through volume mounts:

  • PHP Configuration: Mount your custom PHP settings to /usr/local/etc/php/conf.d/custom-php.ini
  • Apache Configuration: Mount your virtual host config to /etc/apache2/sites-available/000-default.conf

⁠Extensions Included

  • Core: mysqli, pdo, pdo_mysql, intl, zip
  • PECL: igbinary, imagick

⁠Accessing the Web Server

Once the container is running, you can access your web application at:

http://localhost:8080

⁠Image Details

  • Base Image: php:8.1-apache-bookworm
  • Architecture: Multi-stage build for optimized size, supports both ARM64 and AMD64
  • Maintainer: Andy

⁠Building Multi-Platform Images

This image supports both ARM64 (Apple Silicon) and AMD64 (Intel/Linux) architectures. To build for both platforms:

# Make the build script executable
chmod +x build-multiplatform.sh

# Run the build script
./build-multiplatform.sh

Alternatively, you can build manually with Docker Buildx:

# Create and use a buildx builder
docker buildx create --name multiplatform-builder --use

# Build for both platforms
docker buildx build --platform linux/amd64,linux/arm64 --tag custom-php-apache:8.1-general --load .  

⁠License

MIT

Tag summary

Content type

Image

Digest

sha256:dcedc0824…

Size

184.6 MB

Last updated

12 months ago

docker pull ltanh1194/deepworks-php-apache:1.0