Running Docker inside a RAMDisk

Create a RAMDisk

diskutil erasevolume HFS+ 'ramdisk' $(hdiutil attach -nomount ram://$((2048*10000)))

Update your Dockers daemon.json

{
"experimental": false,
"debug": false,
"insecure-registries": [],
"data-root": "/Volumes/ramdisk"
}

On a mac i then use Automator to auto mount this ramdisk on boot.

Unmount the disk

hdiutil detach /dev/disk2

 

Gareth
Buy Me A Coffee
back arrowBack to Index