How to increase the swap space available in the boot2docker virtual machine? How to increase the swap space available in the boot2docker virtual machine? docker docker

How to increase the swap space available in the boot2docker virtual machine?


This GitHub issue was very helpful in figuring out how to increase the swap space available in the boot2docker-vm. Adapting it to my situation I used the following commands to ssh into the boot2docker-vm and set up a new swapfile:

boot2docker sshexport SWAPFILE=/mnt/sda1/swapfilesudo dd if=/dev/zero of=$SWAPFILE bs=1024 count=4194304sudo mkswap $SWAPFILEsudo chmod 600 $SWAPFILEsudo swapon $SWAPFILEexit