This is what worked perfectly for me on Windows 7:
- Setup the MACHINE_STORAGE_PATH environment variable as the root of the location you want to use for the Docker machines/VMs, cache, etc.
- Install Docker Toolbox
- Run Docker Quickstart Terminal
Docker Toolbox will now create all the files at the location pointed at by MACHINE_STORAGE_PATH.
UPDATE:
Note that creating a new VM with the new storage path is not ideal, as the Docker Quickstart Terminal scripts don't seem to work with anything not named "default".
If you've already got a VM sitting in the C: drive, then the simplest thing to do would be to go to Oracle VirtualBox and delete the "default" VM, uninstall Docker Toolbox, delete C:Users<username>.docker, and then follow the 3 steps above.
Note: uninstalling and reinstalling Docker Toolbox may not be required. But I haven't tested without it.
Update
To move Docker certificates also, set the DOCKER_CERT_PATH
variable to point to the path of the new drive. Thanks to @Nutle for the tip.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…