Magento 2 in-a-box

The test environment behind our pipelines, and those of a large part of the ecosystem

What it is

A fully installed Magento or Mage-OS environment in a single Docker image, for every combination of PHP and Magento version, with and without sample data. One docker run and you have a working store with admin, database and Elasticsearch. No install scripts, no waiting, no "works on my machine".

Why we built it

A payment or shipping plugin has to work on every Magento version merchants run, from the oldest supported patch release to the newest. You want to test that on every pull request, not once per release. But installing Magento takes a long time, and in CI you want results within minutes. So we built magento2-in-a-box: ready-made images that run integration and end-to-end tests against the full version matrix in every plugin's pipeline. Since the first version in 2019, every new Magento, Mage-OS and PHP release has been added, usually within days of coming out. The 2.4.9 images and PHP 8.5 are already in there.

Who uses it

The images are open source and are now used well beyond our own projects. Mollie runs the integration and end-to-end tests of its Magento plugin on them, as do Magmodules, Briqpay, MultiSafepay and TradeTracker for their extensions. Rapidez, the headless Magento frontend, uses them for its own test environment, and standalone open source modules such as Joseph Leedy's magento2-module-custom-fees test with them in GitHub Actions.

That is exactly why we share it: if the tooling we use to keep plugins stable also runs in other parties' pipelines, the whole ecosystem gets better tested.

What's in it

  • Full version matrix: Magento 2.4.x including every security patch release, PHP 7.3 through 8.5, plus Mage-OS

  • With or without sample data: the same tag with -sample-data appended

  • CI-ready: one command in GitHub Actions or GitLab CI, admin login and 2FA taken care of

  • Tested itself: the images are verified with Playwright before they are published

The images and the full version matrix are on GitHub.

At a glance

  • Since: 2019, updated continuously with every new Magento, Mage-OS and PHP release

  • Used by: Mollie, Magmodules, Briqpay, MultiSafepay, TradeTracker, Rapidez, among others

  • Code: open source on GitHub

Missing anything?
What are you missing? X
Thank you for your feedback!