How to change the image directory for Docker for Mac on macOS Seirra

I did the following and it seems to work for me.

  1. Go to the current Docker image location
    cd /Users/[username]/Library/Containers/
  2. First you need to make a directory on your external storage device.
    mkdir /Volume/BackupDrive/com.docker.docker
  3. Rsync the current dir to the new location and remove it.
    sudo rsync -a com.docker.docker/ /Volumes/BackupDrive/com.docker.docker
    rm -rf com.docker.docker
  4. Create a symlink to point to the new location
    ln -s /Volumes/BackupDrive/com.docker.docker/ com.docker.docker
  5. Start Docker for Mac