The title error occurred when installing composer in Docker environment. I tried several methods with Gugu, but it took some time to solve it, so I will leave it as a reminder.
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 327680 bytes) in phar:///usr/bin/composer/src/Composer/DependencyResolver/Decisions.php on line 196
This is an error that cannot be installed due to insufficient memory.
make app //Or docker-compose exec app bash
php -d memory_limit=-1 /usr/bin/composer require fruitcake/laravel-cors
**-d ** is an abbreviation for define, and it seems that you can explicitly set the setting value that can be specified in php.ini. PHP Command Line Options
This option allows you to set custom values for configuration directives that you can specify in php.ini. The syntax is as follows: -d configuration_directive[=value]
By setting ** -d memory_limit = -1 **, you can execute unlimited memory limit.