I'm using Docker for windows. The version of Docker Machine is as follows.
docker-machine.exe version 0.16.1, build cce350d7
I'm running Laravel inside a Docker container, but when I try to do composer update
, I get angry.
PHP Fatal error: Uncaught exception 'ErrorException' with message
'proc_open(): fork failed - Cannot allocate memory'
Apparently it was caused by insufficient memory area.
So I tried to expand the swap area and executed the following command, but I was angry with swap on failed: Operation not permitted
.
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
/sbin/mkswap /var/swap.1
/sbin/swapon /var/swap.1
It didn't work even if I gave the authority.
I increased the memory of Docker Machine and it worked. Stop Docker Machine once and start Oracle VM VirtualBox Manager.
Open the corresponding Machine settings as shown below, and increase the memory in System> Motherboard> Main Memory. 2GB worked fine in my environment.
Recommended Posts