Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

388
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda