INNER CODE UNIT · Go

delay

ddev/ddev · winpkg/installer_test.go:87

	const delay = 10 * time.Second

	for attempt := 1; attempt <= quickAttempts; attempt++ {
		// When Docker Desktop integration is active it symlinks /usr/bin/docker →
		// /mnt/wsl/docker-desktop/cli-tools/usr/bin/docker (a real Linux binary).
		// When inactive, /usr/bin/docker does not exist; PATH falls through to the
		// /Docker/host/bin/docker stub which outputs the "integration not enabled" error.
		out, err := exec.RunHostCommand("wsl.exe", "-d", distro, "--", "docker", "ps")
		if err == nil {
			// docker ps works — also verify Docker API is fully ready via docker info.
			// docker ps can succeed while Docker Desktop is still initializing; the
			// installer's 'ddev version' calls docker info/version and hangs with HTTP 500
			// if the Docker daemon isn't fully ready yet.
			infoOut, infoErr := exec.RunHostCommand("wsl.exe", "-d", distro, "--", "docker", "info", "--format", "{{.ServerVersion}}")
			if infoErr == nil && strings.TrimSpace(infoOut) != "" {
				t.Logf("Docker Desktop fully ready in %s (attempt %d/%d), server version: %s", distro, attempt, quickAttempts, strings.TrimSpace(infoOut))
				return true
			}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…