Skip to content

Instantly share code, notes, and snippets.

@giansalex
Last active June 9, 2021 16:27
Show Gist options
  • Save giansalex/a3b32726f223961e9f2d2eba1c938418 to your computer and use it in GitHub Desktop.
Save giansalex/a3b32726f223961e9f2d2eba1c938418 to your computer and use it in GitHub Desktop.
Composer on docker Out of memory

Fix composer memory error on Docker

In containers, composer install/update shows below error

 proc_open(): fork failed - Out of memory

This command fix that error.

/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 
/sbin/mkswap /var/swap.1 
# optional:
# /sbin/swapon /var/swap.1

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment