-
Notifications
You must be signed in to change notification settings - Fork 197
Closed
Labels
Description
MCLOUD-5818: Composer can run out of memory when running in the CLI container
$ docker run -it -v $(pwd):/app/ -v ~/.composer/:/root/.composer/ magento/magento-cloud-docker-php:7.3-cli-1.1 bash -c "composer require --dev sebastian/phpcpd phpmd/phpmd jakub-onderka/php-parallel-lint"
[ ok ] Starting enhanced syslogd: rsyslogd.
Using version ^5.0 for sebastian/phpcpd
Using version ^2.8 for phpmd/phpmd
Using version ^1.0 for jakub-onderka/php-parallel-lint
./composer.json has been updated
Loading composer repositories with package information Updating dependencies (including require-dev)
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
This is a pretty easy fix, CLI container simply needs an environment variable set.
COMPOSER_MEMORY_LIMIT=-1
Preconditions
- Magento 2.3.4
- Install a few packages, to get to the memory limit
Steps to reproduce
- Install Magento using composer
- Add enough composer requires to hit the limit
Expected result
- Should run without error