build_with_docker_autostart.ps1 688 B

12345678910111213141516
  1. $ErrorActionPreference = "Continue"
  2. Set-Location (Join-Path $PSScriptRoot "..")
  3. docker info --format "{{.ServerVersion}}" 2>$null | Out-Null
  4. if ($LASTEXITCODE -ne 0) {
  5. Write-Host "Starting Docker Desktop..."
  6. Start-Process -FilePath "$env:LOCALAPPDATA\Programs\DockerDesktop\Docker Desktop.exe"
  7. for ($i = 0; $i -lt 60; $i++) {
  8. Start-Sleep 3
  9. docker info --format "{{.ServerVersion}}" 2>$null | Out-Null
  10. if ($LASTEXITCODE -eq 0) { break }
  11. }
  12. }
  13. docker info --format "Docker {{.ServerVersion}}" 2>&1
  14. if ($LASTEXITCODE -ne 0) { Write-Error "Docker daemon not reachable."; exit 1 }
  15. & (Join-Path $PSScriptRoot "build_linux_appimage.ps1")
  16. exit $LASTEXITCODE