Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are Docker volumes located when running WSL using Docker Desktop?

I am running Windows Subsystem Linux (WSL) with Ubuntu as client OS under Windows 10. Now I installed Docker Desktop on the Windows host and enabled the WSL integration in the Docker settings. That works fine so far, I can access the Docker daemon running on the Windows host from my WSL Ubuntu client.

Now I am wondering where all the Docker volumes and other data is stored in this setup. Usually these are under /var/lib/docker, but it seems when using WSL this is not the case. When running df -h I can see the following Docker-related lines:

/dev/sdd        251G  3.1G  236G   2% /mnt/wsl/docker-desktop-data/isocache /dev/sdc        251G  120M  239G   1% /mnt/wsl/docker-desktop/shared-sockets /dev/loop0      244M  244M     0 100% /mnt/wsl/docker-desktop/cli-tools 

So they are somewhere on the Windows host it seems.
... but where?

like image 502
Matthias Avatar asked Apr 07 '20 15:04

Matthias


People also ask

Where are docker volumes stored on Windows wsl2?

The files could be found on Windows in \\wsl$\docker-desktop-data\version-pack-data\community\docker\containers .

Where are volumes stored docker desktop?

Volumes are stored in a part of the host filesystem which is managed by Docker ( /var/lib/docker/volumes/ on Linux). Non-Docker processes should not modify this part of the filesystem. Volumes are the best way to persist data in Docker. Bind mounts may be stored anywhere on the host system.

Where does docker desktop store settings?

The configuration file can be found at 'C:\ProgramData\Docker\config\daemon.


1 Answers

When I create a volume named shared_data in docker, I can find it under

\\wsl$\docker-desktop-data\version-pack-data\community\docker\volumes\shared_data\_data

like image 181
Pierre Avatar answered Oct 24 '22 07:10

Pierre