Docker Volume Location on Windows
Like a lot of engineers nowadays, I use Docker for my development environment. I have a Windows 11 machine with Windows Subsystem for Linux (WSL) and I use Docker Desktop for Windows. I also use Developer Containers with a volume for the source code to work with my blog, which means the files are not stored on the local file system but in a Docker volume. Occasionally, I need to access the files in the Docker volume for image creation. This post will show you how to access the files in the Docker volume on Windows.
First off, this post assumes you have Windows, either Windows 10 or Windows 11, with WSL and Docker Desktop installed. If you don’t have Docker Desktop installed, you can download it from Docker Hub.
Docker Volume Location
Update: 2025-01-11: Docker changed the locations of the volumes with release v26.1.4.
When you use Docker Desktop on Windows, the Docker volumes are stored in the WSL file system. The WSL file system is located at \\wsl$\
on the Windows file system.
If you want to see what version of docker you are running, you can open a command prompt or Powershell and run the following command.
1
docker --version
Current Docker Version (v26.1.4 and Higher)
The Docker volumes are stored in the WSL file system at \\wsl$\docker-desktop\mnt\docker-desktop-disk\data\docker\volumes
. You should see a folder for each volume you have created in Docker Desktop. Note: The wsl.localhost
is no longer used in the path.
Previous Docker Version (v26.1.3 and Lower)
The Docker volumes are stored in the WSL file system at \\wsl.localhost\docker-desktop-data\data\docker\volumes
. You should see a folder for each volume you have created in Docker Desktop.
Here is a screenshot of my Docker Desktop volumes.
Here is a screenshot of the WSL file system with the Docker volumes.
As you can see, there is a one to one mapping between the Docker Desktop volumes and the WSL file system. If you access these volumes regularly outside of the containers, you might want to rename the folders to something more meaningful.
Accessing the Volumes
If you do access the volumes a lot, you can create a symbolic link to the volumes folder. To do this, open a command prompt or Powershell as an administrator and run the following command.
Note: You can change the C:\Volumes
to any folder you want to use.
Command Prompt
Version 26.1.4 and Higher
1
mklink /D C:\Volumes \\wsl$\docker-desktop\mnt\docker-desktop-disk\data\docker\volumes
Version 26.1.3 and Lower
1
mklink /D C:\Volumes \\wsl.localhost\docker-desktop-data\data\docker\volumes
PowerShell
Version 26.1.4 and Higher
1
New-Item -ItemType SymbolicLink -Path "c:\Volumes" -Target "\\wsl$\docker-desktop\mnt\docker-desktop-disk\data\docker\volumes"
Version 26.1.3 and Lower
1
New-Item -ItemType SymbolicLink -Path "c:\Volumes" -Target "\\wsl.localhost\docker-desktop-data\data\docker\volumes"
File Explorer
If you open up File Explorer, you should see a folder called Volumes
in the root of the C:\
drive. This folder is a symbolic link to the Docker volumes.
Wrap Up
In this post, you learned where the Docker volumes are stored when using Docker Desktop on Windows. You also learned how to access the Docker volumes from the Windows file system and create shortcuts to them.
References
Share on
Twitter Facebook LinkedIn RedditLike what you read?
Please consider sponsoring this blog.