I was angry with proc_open (): fork failed when trying to composer update inside a Docker container

environment

I'm using Docker for windows. The version of Docker Machine is as follows.

docker-machine.exe version 0.16.1, build cce350d7

I tried to composer update in Docker

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.

Solutions

I increased the memory of Docker Machine and it worked. Stop Docker Machine once and start Oracle VM VirtualBox Manager. 2020-10-25.png

Open the corresponding Machine settings as shown below, and increase the memory in System> Motherboard> Main Memory. 2GB worked fine in my environment.

2020-10-25 (1).png

Recommended Posts

I was angry with proc_open (): fork failed when trying to composer update inside a Docker container
Problems I was addicted to when building the digdag environment with docker
I made a Docker container to run Maven
SpringSecurity I was addicted to trying to log in with a hashed password (solved)
What I was addicted to when developing a Spring Boot application with VS Code
A story about PKIX path building failed when trying to deploy to tomcat with Jenkins
[Docker] How to update using a container on Heroku and how to deal with Migrate Error
What I was addicted to when trying to properly openAPI/Swagger documentation with Rails + Grape + Grape Swagger
Webdrivers :: BrowserNotFound: Failed to find Chrome binary. When I was trying to test E2E with Docker + Rails for the first time, I got stuck in an error.
A note that I had trouble when trying to use nginx with Remote-Containers of vscode
When trying to insert a specific gem (levenshtein) with Docker, an error occurred without ruby-dev
When I tried to run Azure Kinect DK with Docker, it was blocked by EULA
I was addicted to WSl when trying to build an android application development environment with Vue.js
I tried to create a padrino development environment with Docker
I can no longer connect to a VM with a Docker container that can be connected via SSH
I got an IllegalAccessError when trying to use PowerMock with JUnit
A note when I was addicted to converting Ubuntu on WSL1 to WSL2
What I was addicted to when implementing google authentication with rails
I tried deploying a Docker container on Lambda with Serverless Framework
Update MySQL from 5.7 to 8.0 with Docker
A story I was addicted to when testing the API using MockMVC
Rubocop gets angry when I try to fill zeros (fill 0s) with Ruby
I tried to build a Firebase application development environment with Docker in 2020
How to start a Docker container with a volume mounted in a batch file
Error response from daemon: conflict: Conflict when trying to create Docker container, so solution
I tried to create a portfolio with AWS, Docker, CircleCI, Laravel [with reference link]
I tried to make a machine learning application with Dash (+ Docker) part3 ~ Practice ~
[Error resolution] Occurs when trying to build an environment for spring with docker
I was addicted to not being able to connect to AWS-S3 from the Docker container
When I tried to use a Wacom tablet with ubuntu 20.04, I didn't recognize it.
Point memo that was moss when building a docker container created by a colleague
A story that I was really into when I did triple DES with ruby
How to solve when you cannot connect to DB with a new container because the port is assigned to the existing docker container
Attempting to run gnome-terminal inside a Docker container fails (Failed to execute child process “dbus-launch” (No such file or directory))