Local development environment based on Docker
Supported platforms: Magento2, Shopify, BigCommerce, Shopware, PrestaShop, WooCommerce, Medusa.js, Saleor, Spree Commerce, Sylius, Custom projects (PHP, Node.js, Python, Go, Ruby).
madock is a Docker-based local development environment for web projects across many languages and stacks — PHP, Node.js, Python, Go and Ruby. It ships first-class support for popular e-commerce and CMS platforms (Magento 2, Shopify, BigCommerce, Shopware, PrestaShop, WooCommerce, Medusa.js, Saleor, Spree Commerce, Sylius) and handles any custom project just as well.
This project is written in Golang and distributed under the MIT License.
- Automatic project setup
- Two or more projects can work simultaneously
- Magento as a separate service. Works by default. Learn more
- Shopify as a separate service. Learn more
- Custom project as a separate service (PHP, Node.js, Python, Go, Ruby)
- Shopware as a separate service. Learn more
- PrestaShop as a separate service. Learn more
- WooCommerce as a separate service (WordPress + WooCommerce + WP-CLI)
- Medusa.js as a separate service (Node.js backend + auto-provisioned Next.js storefront + PostgreSQL + Redis, optional Meilisearch). Learn more
- Saleor as a separate service (Python 3.12 + PostgreSQL + Redis + uvicorn, optional Celery worker and Saleor Dashboard). Learn more
- Spree Commerce as a separate service (Ruby on Rails admin + auto-provisioned Next.js storefront + PostgreSQL + Redis, optional Sidekiq worker). Learn more
- Sylius as a separate service (PHP 8.3 / Symfony + MariaDB + Redis + Webpack Encore frontend pipeline, optional RabbitMQ for Messenger). Learn more
- BigCommerce as a separate service with 4 SDK presets (Catalyst Next.js storefront, Stencil theme dev, PHP bigcommerce/api SDK, Node embedded app). Learn more
- Cron support
- Flexible configuration for each project
- Database import and export in two clicks
- Simple viewing of logs with one command
- Debug support
- Synchronization of the local database and media files with the dev site
- Multiple database engines: MariaDB, MySQL, PostgreSQL, MongoDB
- Admin UI: phpMyAdmin, pgAdmin, Mongo Express
- Additional services: redis, valkey, memcached, rabbitMQ, elasticsearch, Kibana, ioncube, xdebug, cron
- LiveReload. Learn more
- HMR / file watching on macOS (Next.js, Chokidar, nodemon, vite, …). Learn more
- Mailpit (email testing tool for developers)
- Magento Cloud
- Composer patches in two clicks
- Magento Functional Testing Framework (MFTF). Learn more
- Scopes. Learn more
- Configuration in a project. Learn more
- Snapshots. Learn more
- Isolation mode more
- Varnish Cache more
- Memcached more
- Custom commands more
- MCP Server for AI assistants (Claude Code, Cursor, VS Code) more
- Madock Integration for JetBrains — PhpStorm / IntelliJ plugin for managing madock projects directly from the IDE
- Linux (Ubuntu 20.04)
- macOS (Monterey, Sonoma)
- Windows (10, 11) — via WSL2
You need 5 things on your local machine: git, docker, docker-compose, golang and madock
The new version 2 is not backwards compatible with version 1. If you have problems with version 2, you can use version 1.x temporarily as it is more stable. Version 1 does not receive any more improvements. To use version 1 you should switch to master-1.x.x branch
Each release ships a single self-contained binary on the Releases page. Pick the one for your platform — no Go toolchain required.
| Platform | Asset |
|---|---|
| Mac (Apple Silicon, M1+) | madock-darwin-arm64 |
| Mac (Intel) | madock-darwin-amd64 |
| Linux x86_64 | madock-linux-amd64 |
| Linux ARM | madock-linux-arm64 |
| Windows (via WSL2) | madock-linux-amd64 |
Important: the binary keeps its working data (
docker/,scripts/,projects/,aruntime/) next to itself — these are auto-extracted on first run. Put the binary in a dedicated, writable folder (e.g.~/.madock/) and add it to yourPATHvia a symlink. Do not drop the real file straight into a system directory like/opt/homebrew/binor/usr/local/bin— only the symlink goes there.
Mac — install the downloaded binary
# 1. Put the binary in a dedicated, writable folder
mkdir -p ~/.madock
mv ~/Downloads/madock-darwin-arm64 ~/.madock/madock # Apple Silicon
# mv ~/Downloads/madock-darwin-amd64 ~/.madock/madock # Intel
# 2. Make it executable
chmod +x ~/.madock/madock
# 3. Remove the Gatekeeper quarantine flag (binaries are not Apple-notarized)
xattr -dr com.apple.quarantine ~/.madock/madock
# 4. Symlink into your $PATH (the real file stays in ~/.madock)
sudo ln -s ~/.madock/madock /opt/homebrew/bin/madock # Apple Silicon
# sudo ln -s ~/.madock/madock /usr/local/bin/madock # Intel
# 5. Check it works (first run auto-extracts docker/ and scripts/ into ~/.madock)
madockIf macOS still blocks it: System Settings → Privacy & Security → "Open Anyway".
Linux — install the downloaded binary
mkdir -p ~/.madock
mv ~/Downloads/madock-linux-amd64 ~/.madock/madock # or madock-linux-arm64
chmod +x ~/.madock/madock
sudo ln -s ~/.madock/madock /usr/local/bin/madock # real file stays in ~/.madock
madock # first run auto-extracts assetsWindows — install the downloaded binary
madock on Windows runs inside WSL2. Install
WSL2 and
Docker Desktop with the
WSL2 backend, then use the Linux binary madock-linux-amd64 exactly as in the Linux
instructions above — inside WSL2 madock is a Linux program and behaves like one.
Keep your projects on the Linux side of WSL2 (~/projects, not /mnt/c/...).
Across the /mnt/c boundary file access is slow and file-change events do not
arrive, so watchers and rebuilds behave differently from everywhere else.
A
madock-windows-amd64.exeis published with each release, but running madock natively on Windows is not supported and not tested: it creates symlinks, which Windows permits only in Developer Mode or as administrator, and it renders the container user from the host account id, which on Windows is a SID rather than a number. Use WSL2.
Working on madock itself? Turn on the repository's git hooks once:
git config core.hooksPath .githooks. Before every push they build the code and run the test suite — about two seconds, no Docker needed. The end-to-end suite is separate and runs in a VM of its own; see docs/testing.md.
Follow the installation steps for your system.
Mac
git clone git@github.com:faradey/madock.git
If you got error "git@github.com: Permission denied (publickey)." see solution
- Go to the cloned directory
cd madock- Compile
Run command below for Apple M1
GOARCH=arm64 go build -o madock
Run command below for Apple Intel
go build -o madock
- Add
madockbin into your$PATH
Run command below for Apple M1
sudo ln -s absolute_path_to_your_madock_dir/madock /opt/homebrew/bin/Run command below for Apple Intel
sudo ln -s absolute_path_to_your_madock_dir/madock /usr/local/bin/- Open a new terminal tab/window and check that
madockworks
which madock
madock
- Optionally you can also apply these performance tweaks
Linux
- Install docker
- Configure permissions
- Install Docker-compose
- Install Golang
- Clone this repo and follow into folder "madock"
git clone git@github.com:faradey/madock.git
If you got error "git@github.com: Permission denied (publickey)." see solution
- Compile
go build -o madock
- Add
madockbin into your$PATH
ln -s absolute_path_to_your_madock_dir/madock /usr/local/bin/
- Open a new terminal tab/window and check that
madockworks
which madock
madock
cd <your_project>
madock setup --download --install # for a new empty project with the clean Magento
madock setup # for an existing projectmadock start
madock composer install
sudo vim /etc/hosts
// Add -> 127.0.0.1 <your-domain>
See detailed documentation about development workflow with madock IMPORTANT: Please, read all items before starting work.
- Deployment Guide (Setup existing projects on macOS, Linux, Windows)
- JSON Output
- VSCODE + Xdebug Setup
- PHPStorm + Xdebug Setup
- Docker images list
- Customizations
- Docker Compose override
- Database import, export, synchronization, phpmyadmin
- Media synchronization
- Cron
- ENV variables
- Memcached
- Kibana. URL http://{you_domain_name}/kibana
- Mailpit. Default URL http://localhost:8025
- Store scopes: website vs store
- MCP Server (AI integration for Claude Code, Cursor, VS Code)
If you find it useful and want to invite us for a beer, just click on the donation button. Thanks!
This project has been possible thanks to the following resources:
(c) faradey