Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

395
Visualizações
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)

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

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 ;) .

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda