问题
The standard path on Windows where Docker puts stuff is:
C:\Users\<USER>\.docker
We need to put it here:
D:\Docker
We couldn't find any info about where or how to change that setting. Any hint appreciated, thanks!
回答1:
One solution that works for us is creating a symbolic link:
mklink /J "C:\Users\<USER>\.docker" "D:\Docker"
But it's not what we call a clean solution.
(All credit for the question & this answer goes to IMM0rtalis.)
回答2:
You simply can define the environment variable HOME before launching a new boot2docker or docker machine session.
set HOME=D:\docker
(Add it to your user environment variables if you want it to persists across CMD sessions)
Those tools will look for any config in $HOME/.xxx
来源:https://stackoverflow.com/questions/32948370/change-docker-directory-on-windows