- 1 year ago
Docker change default path for images on Windows
To change the default path for Docker images on Windows, you can follow these steps:
Stop Docker: Ensure that Docker is stopped. You can right-click on the Docker icon in the system tray and select "Quit Docker" or use the Docker CLI to stop Docker.
Move the Docker images folder: By default, Docker images are stored in the
C:\ProgramData\Docker\windowsfilter
directory. To change the path, you need to move this directory to the desired location. For example, let's say you want to move it toD:\DockerImages
. Copy thewindowsfilter
folder and all its contents fromC:\ProgramData\Docker
toD:\DockerImages
.Create a symbolic link: After moving the
windowsfilter
folder, you need to create a symbolic link from the original location to the new location. Open Command Prompt or PowerShell as an administrator and run the following command:shellmklink /J "C:\ProgramData\Docker\windowsfilter" "D:\DockerImages\windowsfilter"
This command creates a junction link (
/J
) that points to the new location. Now, any references to the original path will be redirected to the new path.Start Docker: Start Docker again. It will now use the new path for storing and accessing Docker images.
Please note that modifying Docker's default path for images requires administrative privileges and should be done with caution. Make sure to backup any important data before making any changes.
By following these steps, you can change the default path for Docker images on Windows and move the images to a different location.