hk2-php8.1-fpm
Based on PHP 8.1 FPM & includes all essential extensions required for Magento2.4.4 till Magento2.4.6
1.3K
The HK2 Magento PHP 8.1 FPM project provides a highly optimized, fully configured PHP 8.1 FPM Docker image specifically designed to run Magento 2.4.4 till Magento 2.4.6 environments. It includes all necessary PHP extensions, Composer 1.x, IonCube loaders (with automatic architecture detection for Mac compatibility), and built-in MSMTP support for email routing.
| Feature | Details |
|---|---|
| 💻 Multi-Architecture Support | Fully compatible with standard servers (linux/amd64) and Apple Silicon Macs/ARM devices (linux/arm64) with automated IonCube loader switching. Images are built natively via Docker Buildx. |
| 📦 Pre-configured Extensions | Includes essential Magento 2 PHP extensions: bcmath, gd, intl, pdo_mysql, soap, xsl, zip, redis, and optional xdebug. |
| 🧱 Developer Tools | Comes pre-installed with Composer 1.10.x, image optimization tools (jpegoptim, optipng), Git, and msmtp for email interception. |
| 🔐 Optimized Configurations | Pre-tuned php.ini with 2GB memory limit, increased execution times, and optimal upload sizes for heavy Magento operations. |
| Requirement | Minimum Version |
|---|---|
| Docker Engine | 20.10.0+ |
| Docker Compose | 2.0.0+ |
| Hardware | 4GB RAM minimum (8GB recommended for Magento 2) |
⚠ Note: This container requires an external web server (Nginx/Apache) to proxy requests to the FPM daemon on port 9000.
The simplest way to use this environment is to pull the pre-built, multi-architecture image directly from Docker Hub:
docker pull basantmandal/hk2-php8.1-fpm:latest
(You can also pin to a specific version like :3.0)
Add the following service to your docker-compose.yml:
services:
php:
image: basantmandal/hk2-php8.1-fpm:3.0
build:
context: .
args:
- INSTALL_XDEBUG=false # Set to true to install Xdebug
volumes:
- ./src:/var/www/html
ports:
- "9000:9000"
If you need to build the image locally or modify configurations:
Clone the repository:
git clone https://github.com/basantmandal/docker-magento2-php81.git
cd docker-magento2-php81
Build the image locally (no cache):
./local_build.sh
Run Automated Validation Tests: Ensure PHP version, required extensions, Composer, and IonCube loaded correctly within the container:
./scripts/03.test.sh
Push to Docker Hub (Maintainers):
./scripts/local_upload_image.sh
⚠ Security Warning: Do not expose the FPM port (9000) publicly to the internet. Keep it internal to the Docker network.
| Service | Version | Purpose |
|---|---|---|
| PHP FPM | 8.1.x | Core application processing for Magento. |
| Composer | 2.x | Dependency management optimized for older Magento versions. |
| IonCube | Latest | Required for running encrypted third-party extensions. |
This image relies on your web server (Nginx/Apache) or Magento application to configure and enforce Content Security Policies. Ensure your web server passes appropriate CSP headers.
This container image does not independently collect, store, or transmit any personally identifiable information (PII). All log outputs are written to standard output (stdout/stderr) and managed locally by your Docker daemon.
| Document | Purpose |
|---|---|
| SECURITY.md | Security vulnerability reporting policy and guidelines. |
| CONTRIBUTING.md | Instructions and rules for contributing to the repository. |
| Dockerfile | Source configurations for the Docker container build. |
INSTALL_XDEBUG=false) to prevent performance penalties in production-like environments.We actively welcome contributions! Please read our Contributing Guidelines to understand how to submit bug reports, feature requests, and pull requests.
This project is licensed under the OSL 3.0 License. See the LICENSE file for details.
The author provides this Docker image "as is" without any warranties. Users are responsible for ensuring that running this environment complies with their internal security and software requirements.
Content type
Image
Digest
sha256:b7a44cbb8…
Size
264.2 MB
Last updated
13 days ago
docker pull basantmandal/hk2-php8.1-fpm