Change Docker images location Windows 10 - WSL

PHOTO EMBED

Thu Dec 23 2021 09:36:46 GMT+0000 (Coordinated Universal Time)

Saved by @swina #docker #win10

//Commmand prompt 
wsl --list -v

//Expected output
//  NAME                   STATE           VERSION
//* docker-desktop         Running         2
//  docker-desktop-data    Running         2

wsl  --shutdown

mkdir D:\Docker\wsl\data\ //your path

wsl --export docker-desktop-data "D:\Docker\wsl\data\docker-desktop-data.tar"

wsl --unregister docker-desktop-dat

awsl --import docker-desktop-data "D:\Docker\wsl\data" "D:\Docker\wsl\data\docker-desktop-data.tar" --version 2


//Delete the exported .tar file: D:\Docker\wsl\data\docker-desktop-data.tar and nothing more!
content_copyCOPY