Increase docker container disk space on OS X?

I have created the container rjurney/agile_data_science for running the book Agile Data Science 2.0’s examples. It has mongo, elasticsearch, hadoop, spark, etc. and they all work together. I am using the container to run Spark in local mode, and we process 5GB or so of data that has intermediate output in the tens of GBs.

The container runs out of disk space as soon as any data processing is done. How can I add disk space for this container?

I have searched the forums, and there is no answer. Please help, I’m stuck!

User the instructions here if you are using docker stable No space left on device error - #26 by beccari

If you are using beta, then a somewhat better way is documented here: 1.13.0-rc5-beta35 causes docker to corrupt the disk image · Issue #1118 · docker/for-mac · GitHub

cd ~/Library/Containers/com.docker.docker/Data/database/

$ git reset --hard
HEAD is now at c435935 Settings Changed 09 Jan 17 20:28 +0000

$ cat com.docker.driver.amd64-linux/disk/size
65536

number is in MiB so 150G should be 153600:
$ echo 153600 > com.docker.driver.amd64-linux/disk/size

$ git add com.docker.driver.amd64-linux/disk/size

$ git commit -s -m ‘New target disk size’
and then

rm ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
and restart docker? Unfortunately there’s no UI support for this – we’re still thinking about the best way to present it.