Changing the location of Docker daemon's directory

By default, all data used by Docker daemon, including container images, is stored on your server’s C drive ( defaulting to C:\ProgramData\docker\ ). As the images can occupy a pretty substantial amount of storage capacity, some customers have inquired how to go about moving the Docker daemon directory to another drive.

While this is separate from Locator/Saga data location and not configurable on the Saga side, Docker itself supports a way to relocate it.

To move the directory to another drive, follow this process:

  1. Stop Saga and any other dockerized app. This must be done before performing any of the other steps

  2. Depending on whether you wish to preserve the downloaded Docker images or are okay with redownloading them, the next two steps will be in different order:

    1. To avoid any redownloads:

      1. Copy the contents of C:\ProgramData\docker\ to the new location

      2. Perform a https://docs.docker.com/engine/reference/commandline/system_prune/  ( docker system prune -a -f ).

    2. To redownload, but minimize the amount of copying:

      1. Perform a https://docs.docker.com/engine/reference/commandline/system_prune/  ( docker system prune -a -f ).

      2. Copy the remaining contents of C:\ProgramData\docker\ to the new location. This should be only a few MB

      3. Note that the redownload will be automatic during the next Saga startup and may take ~30 minutes (potentially more if on slower connections)

  3. Create daemon.json in C:\ProgramData\docker\ and configure data-root as per Configure and troubleshoot the Docker daemon/"Docker Daemon Directory" 

  4. Restart the Docker service

  5. Start Saga (and any other dockerized apps) back up again.