|
报错
deploying WSL2 distributions
ensuring main distro is deployed: deploying "docker-desktop": preparing directory "D:\\desktop\\Docker\\data\\main" for WSL distro "docker-desktop": creating distro destination dir "D:\\desktop\\Docker\\data\\main": mkdir D:\desktop\Docker\data: Access is denied.
checking if isocache exists: CreateFile \\wsl$\docker-desktop-data\isocache\: The network name cannot be found.
解决:
运行管理员powershell:
# 创建目录(管理员权限下)
mkdir D:\desktop\Docker\data\main -Force
# 赋予当前用户完全控制权限
$acl = Get-Acl "D:\desktop\Docker\data"
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule("Users", "FullControl", "ContainerInherit,ObjectInherit", "None", "Allow")
$acl.AddAccessRule($rule)
Set-Acl "D:\desktop\Docker\data" $acl |
|