Preparing to install Docker: adding free space to the C:\ disk

Preparing to install Docker: adding free space to the C:\ disk

Today, I needed to install Docker Desktop on my laptop. I've had experience with Docker before, so I knew that there is no way to change the installation directory when installing this useful tool.

The problem was that I had almost no free space left on my C: drive, and Docker can take up a decent amount of disk space. And while the location of containers can be changed (moved to another disk), Docker itself can't, or I don't know how.

The solution I found is to expand the C: volume. This requires free space on another volume or an unallocated area (empty space on the disk not occupied by any of the volumes).

I have 3 volumes on my disk (C:, D:, and E:) and an unallocated area of about 53GB. I decided not to "steal" space from the neighboring volume D:, but instead to expand volume C: to account for the unallocated disk space. But there is a problem here as well - the standard Disk Management Windows 11 can expand a volume only at the expense of the free space that is directly adjacent to it. In my case, volume C: is divided with the unallocated area by two volumes (D: and E:), which means that standard tools cannot do it.

I didn't make a screenshot before making changes to the structure of my disk space, but for clarity I found a similar screenshot on the Internet, except for the sizes of the volumes on it:

Found a screenshot online with a similar disk partition structure.

I found a program with a free version that has the necessary functionality - AOMEI Partition Assistant. It turned out to be easy to use, and with a stated predicted time of 1.5 hours, the whole procedure took me about 10-15 minutes.

?The process is as follows:

  1. Go to https://www.diskpart.com/download-home.html

2. Click on the green button "Download Freeware" - Standard Edition is more than enough for us, and wait for the download to finish.

3. Install the downloaded distribution - I chose the default directory, because I do not need this program for regular use and after all the manipulations it can be safely removed.

4. After installing the program, run it and see the structure of our disk space:

Screenshot from the official website

5. Сlick (highlight) system volume C:, then in the right menu OR right-click: "Advanced" - "Merge partitions":

Screenshot from the official website

6. A window will open with a checkmark on our system volume - put a second checkmark on our unallocated partition and click "Ok":

Screenshot from the official website. In my case, I marked the C: volume and the unmarked free space.

7. The window will close and the "Apply" button with a marker of the number of operations will become active in the upper left corner - you should not be frightened by the fact that there are more operations than one, because in order to expand the volume C:, the program needs to move the unmapped area close to volume C: (i.e. swap the unmapped area first with volume E: and then with volume D:)

Screenshot from the official website. The number of suggested changes in my case was 4, because I wanted to move the unmarked section to the left and put it before volumes D: and E:, and only then merge it with volume C:

8. After clicking the "Apply" button, a window will appear with a notification about the need to reboot the PC - leave the default option selected and click ok.

The computer will reboot, and the process will start. When it completes, you will be notified that the process has ended, and you need to restart the PC - confirm, the PC restarts, and we have the result we were aiming for.

This is what my disk structure looks like after applying the changes, was 99Gb, became 153Gb:

Now that we have free space, we can install Docker Desktop on system disk (volume) C.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了