{"id":43501132,"url":"https://github.com/yvoronoy/magento2docker","last_synced_at":"2026-02-03T11:31:00.600Z","repository":{"id":13912356,"uuid":"75285019","full_name":"yvoronoy/magento2docker","owner":"yvoronoy","description":"Magento2 Docker Environment for developers ","archived":false,"fork":false,"pushed_at":"2023-08-30T14:10:27.000Z","size":252,"stargazers_count":31,"open_issues_count":2,"forks_count":16,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-09-05T17:40:08.675Z","etag":null,"topics":["docker","docker-magento2","magento2-docker-environment","osx-docker-environment","osx-docker-lamp"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yvoronoy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-01T11:12:29.000Z","updated_at":"2023-07-17T19:48:13.000Z","dependencies_parsed_at":"2023-02-10T14:01:30.560Z","dependency_job_id":null,"html_url":"https://github.com/yvoronoy/magento2docker","commit_stats":null,"previous_names":[],"tags_count":12,"template":null,"template_full_name":null,"purl":"pkg:github/yvoronoy/magento2docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yvoronoy%2Fmagento2docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yvoronoy%2Fmagento2docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yvoronoy%2Fmagento2docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yvoronoy%2Fmagento2docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yvoronoy","download_url":"https://codeload.github.com/yvoronoy/magento2docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yvoronoy%2Fmagento2docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29044198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T10:09:22.136Z","status":"ssl_error","status_checked_at":"2026-02-03T10:09:16.814Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-magento2","magento2-docker-environment","osx-docker-environment","osx-docker-lamp"],"created_at":"2026-02-03T11:30:59.803Z","updated_at":"2026-02-03T11:31:00.584Z","avatar_url":"https://github.com/yvoronoy.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Magento2Docker Environment\nA near to perfect Magento2 Development Environment OS agnostic, OSX focused.\nKey features of the project:\n - Simple Apache PHP container based on original images.\n - Ideal to work with multiple projects same time.\n - Multi-project setup with clean host names. Based on external nip.io wildcard DNS server.\n - Provides real-time file synchronization by Mutagen.\n - Includes PHPStorm container which can be rendered by X.ORG port for OSX.\n - Includes great set of tools with zero configuration like Blackfire, XDebug.\n - Includes all external services needed by Magento: ElasticSearch, Opensearch, Redis, Varnish, MySQL, MariaDB, MailCatcher, RabbitMQ, other.\n - Provides bash CLI tool a wrapper. Simplify managing containers.\n - Fully compatible with standard docker-compose commands.\n - Intel and Apple M1 CPU support.\n - Easily extensible.\n - Single docker-compose.yaml file approach with .env file to configure everything.\n## Contents\n- [Pre-requirements](#pre-requirements)\n - [How to install it on Mac](#how-to-install-it-on-mac)\n - [Directory requirements](#directory-requirements)\n- [Installation](#installation)\n- [Supported services and tools](#supported-services-and-tools)\n- [Usage](#usage)\n - [Quick Start](#quick-start)\n - [How to install a magento](#how-install-magento)\n - [How to deploy magento dumps/backups](#how-deploy-dumps)\n- [How to use xDebug](#how-to-enable-xdebug)\n- [How to use Blackfire](#how-to-start-using-blackfire)\n - [Pre-requirements](#pre-requirements-1)\n - [Usage](#usage-1)\n- [How to run PHPStorm inside container](#how-to-run-phpstorm-inside-container)\n- [Todo List](#todo-list)\n- [Contributing](#contributing)\n\n## Pre-requirements\n - [Install Docker](https://docs.docker.com/engine/installation/mac/)\n - [Install Mutagen](https://mutagen.io/documentation/introduction/installation/)\n - Bash \u003e 4.0\n - Realpath\n\n ### How to install it on Mac\n```bash\n# Mutagen:\nbrew install mutagen-io/mutagen/mutagen\n# Bash:\nbrew install bash\n# Realpath:\nbrew install coreutils\n```\n\n### Directory requirements\n1. Magento2Docker as a tool can be located in any directory, e.g. ~/tools/m2d\n2. Web container will use /var/www/html as its root folder for web content.\n3. The M2D_SOURCE_DIRECTORY must point to a local path where you want to sync /var/www/html from the web container.\n4. The M2D_SOURCE_DIRECTORY must not point to symlink or it will trigger errors when Mutagen is responsible for sync process.\n\n## Installation\nYou can download archive of this project on [Release Page](https://github.com/yvoronoy/magento2docker/releases).\n\n - Clone or Download the repository ```git clone git@github.com:yvoronoy/magento2docker.git```\n - Go to project folder\n - Execute setup creator `./bin/m2d setup init`\n - Optional: fine tune all setings by editing `.env` file\n\n## Supported services and tools\n### Web Servers\n- Apache with PHP: 7.3, 7.4, 8.0, 8.1, 8.2\n\n### DB Engines\n- MySQL: 5.7, 8.0, 8.0-oracle, and 5.7 as 5, 8.0.28 as 8\n- MariaDB: 10.2, 10.3, 10.4, 10.6, and 10.4 as 10\n\n### Search Engines\n- Opensearch: 1.2.4 as 1.2, 1.2.4 as 1, 2.5.0 as 2.5, 2.5.0 as 2\n- Elasticsearch: 6.8.23 as 6, 7.16.3 as 7, 7.6.2 as 7.6, 7.7.1 as 7.7, 7.9.3 as 7.9, 7.10.1 as 7.10, 7.16.3 as 7.16, 7.17.9 as 7.17, 8.4.3 as 8, 8.4.3 as 8.4\n\n### DB Cache Engines\n- Redis: 6.2, 5.0 as 5, 6.0 as 6, 7.0 as 7\n\n### Web Cache Engines\n- Varnish: 6.0, 6.2, 6.4, 6.5, 7.0, 7.1, and 7.0 as 7, 6.5 as 6\n\n### Tools\n- Blackfire: latest\n- Mailcatcher: latest\n- Selenium: 3.14.0\n\n### Domains\nWith the default setup, Magento2Docker will use nip.io in this way:\n`http://{LEVEL_2}.{LEVEL_1}.127.0.0.1.nip.io`\nwhere:\n- LEVEL_1 is a name of a folder inside /var/www/html\n- LEVEL_2 is a subdomain that can be used to simulate multi-website Magento setup\n\nAssume you have a multi-website Magento setup in the m246 folder; your domains can look like this:\n- http://m246.127.0.0.1.nip.io\n- http://website1.m246.127.0.0.1.nip.io\n- http://website2.m246.127.0.0.1.nip.io\nAll the above will point to /var/www/html/m246 in your container.\n\n\n## Usage\nTo work with Magento2Docker you can use `m2d` CLI command located in `bin` of Magento2Docker project.\n### Quick Start\nWith Magento2Docker v3 it is super easy to start or stop containers:\n```bash\n# Display help\n./bin/m2d --help\n\n# To start containers:\n./bin/m2d up\n\n# To stop containers:\n./bin/m2d stop\n\n# To stop and remove containers and networks:\n./bin/m2d down\n\n# To enable service e.g. mailcatcher\n./bin/m2d enable mailcatcher\n\n# To disable service e.g. elasticsearch:\n./bin/m2d disable search-engine\n\n# To edit any .env parameter (e.g. PHP version):\n./bin/m2d set M2D_WEB_SERVER_PHP_VERSION 8.1\n\n# To display any .env parameter (e.g. search engine type):\n./bin.m2d show M2D_SEARCH_ENGINE_VENDOR\n\n# To start containers after enabling or disabling services or editing parameters:\n./bin/m2d up --build\n```\n\n\n### How to install a magento inside container\n   - Login to container `./bin/m2d go web`\n   - Create a directory e.g: magento2\n   - Inside the magento2 directory run `m2install.sh -s composer -v 2.4.6`\n   - Open browser and go to http://magento2.127.0.0.1.nip.io/\n\n### How to deploy dumps (backups) inside container\n - Put dumps to src folder on your host machine\n   - Login to container `./bin/m2d go web`\n   - Run `m2install.sh`\n\n## How to link Composer versions\n\nContainers with PHP 7.x have Composer 1 set as default, containers with PHP 8.x have Composer 2 set as default version.\n\n### Usage:\n- Login to container `./bin/m2d go web`\n- To use composer as default you have two commands:\n  - Run command `sudo composer-link.sh 1` to use Composer 1\n  - Run command `sudo composer-link.sh 2` to use Composer 2\n\n## How to Enable xDebug\n\nThe container already includes PHP xDebug extension. The xDebug extension is disabled by default because\nit is dramatically decrease performance.\n\n### Usage\n - Login to your container `./bin/m2d go web`\n - Run command `sudo xdebug-php.sh 1`\n - Run IDE (PHPStorm) and press button _Start Listening for PHPDebug Connection_\n\n\n## Persistent folders\n### Any file saved out of these folders will be lost when the container is terminated\n  - /var/www/html\n  - /home\n  - /root\n  - /root/.composer/cache\n\n## How to start using Blackfire\n[Blackfire Profiler](https://blackfire.io/docs/introduction) is a PHP profiler and automated performance testing tool. It enables you to investigate performance issues in very simple way, just install a browser extension and press the button. You will get granular performance report to measure CPU, IO, Memory, Network, etc.\nProfiling with Blackfire is on-demand. This means that Blackfire adds no overhead for your end users, which makes it safe to use in production.\n\n### Get your Blackfire credentials\nBlackfire provides you a free account \"Hack\" which allows you to run profiles on your development environment.\n - Create account and login here: https://blackfire.io/login\n - Install Browser Extension https://blackfire.io/docs/integrations/chrome\n - Go to the page https://blackfire.io/docs/integrations/docker\n   - Define these environment variables from this page on the host system (OSX)\n   - You can save them permanently by putting them into ~/.bash_profile file\n - Enable blackfire container `./bin/m2d enable blackfire`\n - Recreate containers by using command `./bin/m2d up --build`\n\n## How to run PHPStorm inside container\n\n### Pre-requirements\n - Install and setup XQuartz\n   - Install `brew cask install xquartz`\n   - Open `open -a XQuartz` and go to X11 Preferences\n     - Goto Security tab and check Allow connections from network clients\n     - Restart computer\n### Usage\nRun the following command inside env directory\n\n```\ndocker-compose -f docker-compose.phpstorm.yml up -d --build\n```\n\n## Todo List\n\n## Contributing\n1. Fork this repository.\n2. Create your feature branch: `git checkout -b feature/my-cool-feature`.\n3. Commit your changes: `git commit -am 'Add some feature'`.\n4. Push to the branch: `git push origin feature/my-cool-feature`.\n5. Submit a pull request.\n\n## Credits\nSpecial thanks to @snosov and @tshabatyn who share their ideas and inspired to build this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyvoronoy%2Fmagento2docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyvoronoy%2Fmagento2docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyvoronoy%2Fmagento2docker/lists"}