Correspondence when it becomes killed after composer require in Docker
I made a development environment with Docker (docker-compose) on Mac, and when I made a `composer require` on the Laravel application under development, it was interrupted.
composer require ****/***** (Omitted) killed
If composer ends in the middle, I think that lack of memory is a standard thing. I got this link from a senior at the company and the suspicion turned into conviction.
[PHP] Cause and action when composer install fails with killed https://webbibouroku.com/Blog/Article/composer-killed
PHP memory_limit increase
When I found out that there was not enough memory, I first increased the memory_limit of
php.ini used in Docker.
I didn’t know how much it needed, but for now I made it 2GB (2048MB).
memory_limit = 2048M
After changing the setting, docker build and restart
Increase memory allocation for Docker for Mac
The resource that Docker specified in Docker for Mac can use was initially 2GB. I have 64GB of memory in my MacBook Pro, so I increased it to Dawn and 8GB. I think this is a consultation with machine specs.
After the change, it took a reboot of the Docker host.
I changed the memory settings in the above two points and succeeded in executing
composer update requires a lot of memory as well, so you may need to do the same.