Cloudmersive Private Cloud Docker Advanced Storage Configuration

Overview

You can configure the Docker primary storage location to be a different drive than C:\ - follow these steps to perform this change

Step 1 - Complete the Pre-requisites installation step

First, perform the pre-requisites installation step. This will ensure Docker is installed on the server. Docker must be installed prior to proceeding to step 2.

Step 2 - Create a Storage Folder on D:\ or other drive

Now, we need to create a folder to store the container data on our other drive. Navigate to the D:\ or other drive in Windows Explorer and create a folder called DockerRoot

Step 3 - Configure Docker

In Windows Explorer, navigate to C:\ProgramData\docker\config\ and find the file named Daemon.json. If the file does not exist, create an empty text file named Daemon.json. By default, Windows Explorer may name the file you create Daemon.json.txt - if this happens you must ensure that you rename this file to Daemon.json (and not Daemon.json.txt). You can do this in Windows Explorer by clicking on View > Options, then clciking on the View tab, unchecking the box "Hide extensions for known file types" and clicking OK; once complete, rename the file to Daemon.json. Open Daemon.json in Notepad or other equivalent text editor. Add the highlighted line to this text file:

"graph": "D:\\DockerRoot"
Be sure to add a comma on the preceding line; your Daemon.json file will now look like this once your edit is complete:
{
    "registry-mirrors": [],
    "insecure-registries": [],
    "debug": true,
    "experimental": false,
    "graph": "D:\\DockerRoot"
}

Step 4 - Restart Docker Service

Open the Start Menu and type Services, and then open the Services app. In the list of services that appears, find Docker Engine. Select Docker Engine, and then choose the Restart command.

You have now successfully modified Docker's configuration to store image data on the D:\DockerRoot folder instead of the C:\ drive.