What Is New in Version 2
magento-scriptsversion 2.0.0 has been in development since mid-July 2022 and the main goal of its creation was to eliminate dependency on system packages.
That was the reason why
magento-scriptsstopped working on Ubuntu 22.04 (because of the upgraded OpenSSL version) and in general, required a super-complex system for installing and validating required packages on all systems, plus a complex and time-consuming PHP build time to process. And it was practically impossible to isolate CMA instances from one another without the need to compile PHP for each instance. But it was fast in the end because PHP was running on the host system and did not experience performance losses on file operations or processing power in the VM on macOS and other systems.
Version 2 introduces a PHP container into the setup. With this move, we don't need a complex dependency installation and validation system, nor a complex PHP build system anymore.
PHP Image Infrastructure
Those are the steps for PHP images:
- 1.Alpine Linux image is used as a base for images with PHP. Only in this step PHP is actually compiled. No additional extensions are installed.
- 3.PHP image with Magento extensions is used as a base for Project Image that is built on the user system. This image installs the Composer version corresponding to Magento requirements and additional extensions for PHP defined in the configuration file by a user.
Steps 2-3 are repeated for images with XDebug that are based on PHP images with XDebug.
We observed a very strange behaviour with MySQL 5.7 on Linux systems with Docker Engine. When started container will consume all resources given to the system and basically freeze the computer.
Since existing setups are still running on MySQL we developed a migration script that will run if it detects that you have MySQL volume in your project. The process is automated, the user just needs to press ENTER a few times to get a new working setup.
Maildev is also added to the setup so you will be able to catch emails during development.