Optimized WordPress FPM Docker Image with Alpine, HTTPD, MariaDB, Opcache, APCu, and Redis Caching
350
Overview:
This custom Dockerfile extends the official wordpress:alpine-fpm image to create a high-performance, secure, and scalable WordPress environment optimized for Kubernetes deployments. By integrating essential PHP caching extensions—Opcache, APCu, and Redis—this setup significantly enhances WordPress performance, reduces server load, and ensures efficient resource utilization. Key Features
Base Image:
wordpress:alpine-fpm: Utilizes the lightweight Alpine Linux-based PHP-FPM image, ensuring minimal footprint and enhanced security.
PHP Extensions:
Opcache: Caches compiled PHP bytecode, reducing script compilation overhead and speeding up PHP execution. APCu: Provides an in-memory caching solution for storing application data, minimizing redundant computations and database queries. Redis: Implements a high-performance in-memory data structure store, serving as an object cache to accelerate WordPress operations and enable efficient session management.
Installation Process: Build Dependencies: Installs necessary build tools required for compiling PHP extensions. PECL Extensions: Uses PECL to install and enable Redis and APCu extensions seamlessly. Cleanup: Removes build dependencies post-installation to maintain a slim and efficient image.
Configuration Files: opcache.ini: Custom configuration file to fine-tune Opcache settings, ensuring optimal memory usage, cache size, and revalidation frequency tailored to the application's needs. apcu.ini
Performance Optimization: Multi-Layer Caching: Combines Opcache for PHP bytecode caching, APCu for in-process data caching, and Redis for shared object caching, providing comprehensive performance improvements. Resource Allocation: Allocates minimal resources to Redis sidecar, ensuring efficient utilization without overwhelming the Pod.
Content type
Image
Digest
sha256:9e900e85d…
Size
103.2 MB
Last updated
over 1 year ago
docker pull infinityonlinesolutions/alpine-wordpress-fpm-cache:1.11