Change .docker directory on Windows

The standard path on Windows where Docker puts stuff is:

C:\Users\<USER>\.docker

We need to put it here:

  • OSX terminal vs Docker CLI
  • Confusion on using docker-compose volumes to serve django static files
  • Could not launch environment: Application version is unusable and cannot be used with an environment
  • How could I install the correct docker-compose version for 1.6.2
  • Can docker run inside a Linux Container?
  • Mongodb official image errno:111 Connection refused when trying to create replicaset
  • D:\Docker
    

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

  • MySQL import hangs on Vagrant CoreOS box on Mac
  • Docker file mount understanding
  • Serving static files directly via a containerized front-end web server?
  • Docker host network not working
  • Rancher developent enviroment
  • Updating boot2docker to 1.4.0 not taking
  • 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.