Skip to content

faradey/madock

Repository files navigation

Local development environment based on Docker

madock

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).

GoDoc Go Report Card GitHub release GitHub license GitHub issues

Description

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.

Key Features

  • 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, 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
  • Custom commands more
  • MCP Server for AI assistants (Claude Code, Cursor, VS Code) more

IDE Plugins

Tested on

  • Linux (Ubuntu 20.04)
  • macOS (Monterey, Sonoma)
  • Windows (10, 11)

Video

madock - install the two Magento 2 projects

Installation

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

Option A — Download a prebuilt binary (recommended)

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 madock-windows-amd64.exe

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 your PATH via a symlink. Do not drop the real file straight into a system directory like /opt/homebrew/bin or /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)
madock

If 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 assets
Windows — install the downloaded binary

madock runs on Windows with Docker Desktop. Two options:

  • Native Windows: download madock-windows-amd64.exe, rename it to madock.exe, and place it in a dedicated writable folder (e.g. C:\madock\). Add that folder to your PATH. On first run it auto-extracts its docker\ and scripts\ assets there.
  • WSL2 (Linux environment): install WSL2, then use the Linux binary madock-linux-amd64 exactly as in the Linux instructions above.

Option B — Build from source

Follow the installation steps for your system.

Mac
  1. Install Docker
  2. Install Golang
  3. 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

  1. Go to the cloned directory
cd madock
  1. Compile
Run command below for Apple M1

GOARCH=arm64 go build -o madock
Run command below for Apple Intel

go build -o madock
  1. Add madock bin 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/
  1. Open a new terminal tab/window and check that madock works
which madock
madock
  1. Optionally you can also apply these performance tweaks
Linux
  1. Install docker
  2. Configure permissions
  3. Install Docker-compose
  4. Install Golang
  5. 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

  1. Compile
go build -o madock
  1. Add madock bin into your $PATH
ln -s absolute_path_to_your_madock_dir/madock /usr/local/bin/
  1. Open a new terminal tab/window and check that madock works
which madock
madock

Project Setup

cd <your_project>
madock setup --download --install # for a new empty project with the clean Magento
madock setup # for an existing project

Usage

Start Application

madock start
madock composer install
sudo vim /etc/hosts
// Add -> 127.0.0.1 <your-domain>

Workflow

See detailed documentation about development workflow with madock IMPORTANT: Please, read all items before starting work.

More Documentation

Donations

If you find it useful and want to invite us for a beer, just click on the donation button. Thanks!

"Buy Me A Coffee"

Resources

This project has been possible thanks to the following resources:

License

Copyright

(c) faradey

About

Local development environment based on Docker

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors