Change .docker directory on Windows

The standard path on Windows where Docker puts stuff is:


We need to put it here:

  • Development environment setup for Mac and CentOS using Docker
  • What is the proper endpoint for connecting to azure container service swarm cluster from c#
  • CentOS 7 : docker in docker: “Error: No space left on device”
  • Dynamically start new Docker containers when needed?
  • Building docker images from a source directory using different dockerfiles
  • How to prohibit ordinary users to read the file '/proc/cpuinfo' in a docker?
  • D:\Docker

    We couldn’t find any info about where or how to change that setting. Any hint appreciated, thanks!

  • Is there any way to obtain detailed logging info when executing 'docker stack deploy'?
  • Exposing a port other than 3000 with Express and Docker
  • Starting Docker Daemon Through Ansible
  • pull from private docker repo in msbuild
  • Use perf inside a docker container without --privileged
  • gcloud docker push reliability
  • 2 Solutions collect form web for “Change .docker directory on Windows”

    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.)

    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

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.