Change .docker directory on Windows

喜你入骨 提交于 2019-12-22 07:01:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!