By default Docker Desktop will create two distros as below at %LOCALAPPDATA%/Docker/wsl
- docker-desktop
- docker-desktop-data
This folder will be used to store image and so on. Hence, its size will be increased in the future, which result in our Windows installed drive out of space. I will move it to E drive.
Below steps will move docker-desktop-data out of the Windows installed drive.
Open command prompt in Windows 10 or Powershell:
1. Stop Docker
wsl --shutdown
2. Export docker-desktop-data to tar file
wsl --export docker-desktop-data E:\docker-desktop\docker-desktop-data.tar
3. Unregister current docker-desktop-data
wsl --unregister docker-desktop-data
4. Import docker-desktop-data from tar file
wsl --import docker-desktop-data E:\docker-desktop\data E:\docker-desktop\docker-desktop-data.tar --version 2
5. Start Docker
start docker
No comments:
Post a Comment