Created
January 13, 2022 02:27
-
-
Save tg123/aebe24169d2b696a89c74b5141c7499a to your computer and use it in GitHub Desktop.
Auto accept Docker Desktop EULA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pwsh -Command { | |
& "C:\Program Files\Docker\Docker\Docker Desktop.exe" | |
Add-Type -Path "C:\Program Files\Docker\Docker\*.dll" -ErrorAction SilentlyContinue | Out-Null | |
while ($true) { | |
$instance = New-Object Docker.Core.GoBackend.GoBackendClient | |
$setting = $instance.GetSettingsAsync().Result | |
if ($setting.LicenseTermsVersion -eq 2) { | |
break | |
} | |
Write-Host "waiting for setting" | |
Start-Sleep 5 | |
$setting.LicenseTermsVersion = 2 | |
$instance.SaveSettingsAsync($setting) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment