Repolode
markshust

markshust/docker-magento

Docker-based development environment for Magento 2, with Compose setups, PHP and Nginx images, and helper CLI scripts.

Stars
2,867
Forks
1,060
Open issues
3
Last commit
10 days ago

What is it?

docker-magento is a Docker configuration for setting up a local Magento 2 development environment. It provides custom PHP-FPM and Nginx images, sample Docker Compose setups, and a set of bin/ helper scripts that wrap common tasks such as installing Magento, running bin/magento and Composer inside containers, and managing containers.

The project covers the supporting services a Magento store needs, including MariaDB, OpenSearch or Elasticsearch, RabbitMQ, Varnish and an SSH container, with image tags pinned to specific Magento and Mage-OS versions. It can install Mage-OS or Adobe Commerce / Magento Open Source with a one-line setup script, and supports Xdebug, Hyvä theme builds and PHP code quality tools.

It is aimed at Magento developers working on macOS or Linux, with Windows supported through WSL. The project is MIT licensed and is accompanied by a free screencast course from M.academy.

Key features

  • 01Custom PHP-FPM and Nginx Docker images for Magento 2
  • 02Docker Compose setups including OpenSearch or Elasticsearch, RabbitMQ and Varnish
  • 03One-line installer for Mage-OS or Adobe Commerce / Magento Open Source
  • 04Xdebug debugging triggered by a cookie in a dedicated container
  • 05Helper scripts for bin/magento, Composer, database backup and PHPCS/PHPStan

Use cases

  • Setting up a local Magento 2 development environment without installing PHP and MySQL on the host
  • Testing a Magento store against OpenSearch or Elasticsearch in a containerized setup
  • Debugging Magento code with Xdebug inside Docker and PhpStorm
  • Building Hyvä themes with Tailwind inside the project's containers

Topics

#magento#magento-2#docker#docker-compose#php#ecommerce#development-environment#docker-magento#hacktoberfest#magento2

FAQ

What is docker-magento?
Docker-based development environment for Magento 2, with Compose setups, PHP and Nginx images, and helper CLI scripts. docker-magento is a Docker configuration for setting up a local Magento 2 development environment. It provides custom PHP-FPM and Nginx images, sample Docker Compose setups, and a set of bin/ helper scripts that wrap common tasks such as installing Magento, running bin/magento and Composer inside containers, and managing containers.
Is docker-magento free to use? What license does it have?
docker-magento is open source under the MIT license. Check the license terms before using it in commercial products.
Is docker-magento still maintained?
Actively maintained. The last commit to docker-magento was on Oct 28, 2026.
What can I use docker-magento for?
Setting up a local Magento 2 development environment without installing PHP and MySQL on the host Testing a Magento store against OpenSearch or Elasticsearch in a containerized setup Debugging Magento code with Xdebug inside Docker and PhpStorm Building Hyvä themes with Tailwind inside the project's containers
Where can I get docker-magento?
The source code and installation instructions are on GitHub: https://github.com/markshust/docker-magento

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects