Skip to content

Instantly share code, notes, and snippets.

@tg123
Created January 13, 2022 02:27
Show Gist options
  • Save tg123/aebe24169d2b696a89c74b5141c7499a to your computer and use it in GitHub Desktop.
Save tg123/aebe24169d2b696a89c74b5141c7499a to your computer and use it in GitHub Desktop.
Auto accept Docker Desktop EULA
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