I’ve been able to setup some containers and volumes.
#DOCKER DESKTOP VOLUME LOCATION WINDOWS 10#
Symlink The first obvious idea was to symlink the default storage location to another partition: sudo ln -s /mnt/newlocation /var/lib/docker 2. I’ve installed Docker Desktop for Windows and a Ubuntu 20.04 distribution on my Windows 10 machine. Mounted backup volume in /backup dir belongs to root user. These two solutions could have worked in the past as you may often find them online, but neither of them worked for me with Ubuntu-based Linux distros in 2018-2019 (Docker version > 17).
![docker desktop volume location docker desktop volume location](https://user-images.githubusercontent.com/23661765/78978919-0d8e8980-7b1b-11ea-82d5-17e51b88e724.png)
(Caveat - I haven't yet done this with the docker WSL2 instances yet myself, only for Ubuntu using the method in the second link. I have Docker container with named volume running on non-root user started with the following command: docker run -v backup:/backup someimage In the image, theres a backup script which is trying to save files in /backup directory but it fails. This process is also described here (with regard to standard WSL instances).
#DOCKER DESKTOP VOLUME LOCATION FREE#
In theory, these WSL2 instances can be re-located to an alternate drive to free disk space as per this post that is the standard method for exporting, unregistering, and re-importing an instance from a new location. Below are step-by-step to move docker-desktop-data out of System Drive, for example, E:\docker-desktop\data. Therefore, its size will be increased in the future, consequently, our System Drive will be out of space.
![docker desktop volume location docker desktop volume location](http://man.hubwiz.com/docset/Docker.docset/Contents/Resources/Documents/docs.docker.com/docker-for-mac/images/toolbox-install.png)
Presumably, these are docker-desktop-data and docker-desktop respectively. distro/ext4.vhdx which is consumed by docker-desktop In which, docker-desktop-data is used to store images and so on. If you are wondering where on the Windows host the docker volumes are located, for me they seem to be atĬ:\Users\username\AppData\Local\Docker\wsl\data\ext4.vhdxĬ:\Users\username\AppData\Local\Docker\wsl\distro\ext4.vhdx Hit enter, and it should display your WSL volumes, including the ones for Docker for Windows. BTW, Source is the location on the host and Destination is the location inside. Open Windows Explorer, and type \\wsl$ into the location bar. Your volume directory is /var/lib/docker/volumes/blogpostgres-data/data. You can find WSL2 volumes under a hidden network share. Docker really did an amazing integration. So we can open the Kubernetes master URL in our Windows browser: And this is the real strength from Docker Desktop for Windows with the WSL2 backend.
![docker desktop volume location docker desktop volume location](https://statswork.wiki/docker-for-mac/images/menu/prefs.png)
\\wsl$\docker-desktop-data\version-pack-data\community\docker\volumes\shared_data\_data The cluster has been successfully created, and because we are using Docker Desktop, the network is all set for us to use 'as is'. When I create a volume named shared_data in docker, I can find it under