Prepacked image for Magento2®, optimized for performance and headless commerce.
8.1K
mappia/magento2Prebuilt, Alpine-based images of stock Magento 2 Community Edition — source installed, DI compiled, static content deployed. Useful for spinning up a reference store, reproducing a bug against a clean install, or as a demo target.
Built on mappia/magento-php, which supplies the PHP extensions, Composer, and opcache tuning.
Tip
For production, build your own image from your own `composer.lock`. These images are stock Magento with no third-party modules and no customization — they are a starting point and a reference, not a deployment artifact.
| Variant | Purpose |
|---|---|
cli | Setup, cron, indexers, bin/magento. |
fpm | Serving PHP over PHP-FPM for web requests. |
Both hold the identical /var/www/html — the fpm stage copies it from the cli stage — so the two never drift.
| Tag suffix | PHP base |
|---|---|
2.4.6 | mappia/magento-php:{cli,fpm}-alpine8.2 |
2.4.7 | mappia/magento-php:{cli,fpm}-alpine8.2 |
2.4.8 | mappia/magento-php:{cli,fpm}-alpine8.4 |
2.4.9 | mappia/magento-php:{cli,fpm}-alpine8.5 |
Constraints are ranges, so a rebuild picks up the newest security patch in that line (2.4.9-p1, etc.).
A tag is [<prefix>-]<variant>-alpine<magento>, e.g. cli-alpine2.4.9 or 20250421-fpm-alpine2.4.8. Three prefix flavors are published:
| Flavor | Example | Digest | Cadence |
|---|---|---|---|
| 🌲 Evergreen Tags | cli-alpine2.4.9 | moves | Re-pushed weekly and on every release. |
| 🏔️ Mappia version Tags | v0.9.0-alpha.2-cli-alpine2.4.9 | fixed | Once, when that Mappia release is published. |
| ⏱️ Date Tags | 20250421-cli-alpine2.4.9 | fixed | A new date tag every Monday. |
Pin a fixed-digest tag (Mappia version or date) for anything reproducible. Evergreen tags re-resolve Magento patch releases, PHP patch versions, and Alpine packages on each weekly rebuild.
Relative to the mappia/magento-php base:
composer create-project at /var/www/html, then composer install --no-devvendor/magento/magento2-base, vendor/magento/**/Test, and dev/ are removed after installapp/etc/config.php enabling the stock module set — this is what lets setup:di:compile run at build time without a databasebin/magento setup:di:compilecomposer dump-autoload -o --classmap-authoritativebin/magento setup:static-content:deploy -f for the Magento/backend and Magento/luma themes onlyvar/ and pub/media group-writable and group-owned by www-data; bin/magento executableImportant
There is **no `env.php`** and no bundled services. The image contains no MySQL/MariaDB, OpenSearch/Elasticsearch, Redis, or RabbitMQ — Magento will not boot until you supply an `env.php` pointing at running services.Only
Magento/backendandMagento/lumastatic content is deployed.
Inspect a stock install, no services required:
docker run --rm -it mappia/magento2:v0.9.0-alpha.2-cli-alpine2.4.9 sh
Run a store, with your own env.php and services alongside:
docker run --rm \
-v "$PWD/env.php:/var/www/html/app/etc/env.php:ro" \
-p 9000:9000 \
mappia/magento2:v0.9.0-alpha.2-fpm-alpine2.4.9
Or use them as the base for a store image — the Magento source is already there, so add modules and redeploy:
FROM mappia/magento2:v0.9.0-alpha.2-cli-alpine2.4.9
Content type
Image
Digest
sha256:96ed8c503…
Size
161.7 MB
Last updated
3 days ago
docker pull mappia/magento2:20260914-fpm-alpine2.4.8