How to increase docker-machine memory Mac

DJElbow picture DJElbow · Sep 29, 2015 · Viewed 81.2k times · Source

I am new to Docker, and trying to go through this tutorial setting up MemSQL from a Docker image - http://docs.memsql.com/4.0/setup/docker/ . I am on a Mac, and the tutorial uses boot2docker which seems to have been deprecated.

The VM needs 4GB memory to run. The tutorial specifies how to do this with boot2docker but I cannot find a way to do this with the docker-machine/docker toolbox.

Here is the command I am using and the error I am getting just trying to go through the tutorial without altering the boot2docker config.

docker run --rm --net=host memsql/quickstart check-system
Error: MemSQL requires at least 4 GB of memory to run.

Answer

Ran Rubinstein picture Ran Rubinstein · May 2, 2016

You can do this via the command line. For example, to change the machine from the default 1cpu/2048MB RAM run:

docker-machine stop
VBoxManage modifyvm default --cpus 2
VBoxManage modifyvm default --memory 4096
docker-machine start

You can then check your settings:

VBoxManage showvminfo default | grep Memory
VBoxManage showvminfo default | grep CPU

And for docker-machine inspect to report the correct state of things, edit ~/.docker/machine/machines/default/config.json to reflect your changes.