Problem
When you are trying to install a package inside a debian Docker container you get the following error message:
1 |
FATAL -> Failed to fork. |
Solution
This is an indication of ‘out of memory’ so add a swap partition if it does not exist, on the host with the following:
1 2 3 4 5 |
fallocate -l 4G /swapfile chmod 600 /swapfile mkswap /swapfile swapon /swapfile echo "/swapfile swap swap sw 0 0" >> /etc/fstab |
(Thanks Valent)