Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

386
Views
composer cannot allocate memory inside container docker

I currently use docker to run my Symfony3. But I get this error when I try to run composer update inside my container (after doing command docker exec -it <name of the bash container>)

[ErrorException]
Proc_open (): fork failed - Can not allocate memory

The composer documentation asks to configure the swap of the machine but I get this error by following the steps of the documentation

/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 (OK)                     
/sbin/mkswap /var/swap.1 (OK)

/sbin/swapon /var/swap.1 (KO) -->
Swapon: /var/swap.1: swapon failed: Operation not permitted

(Even though I'm in root mode)

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I finally found the answer to my problem.

You can start by adding space on your virtual machine (default). In my case I switched from 1GB to 2GB.

Then you can, if you wish, launch your container with the option --memory-swap = -1 or a space you have chosen
https://docs.docker.com/engine/admin/resource_constraints/#memory-swap-details

It's OK for me now ;) .

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!