Skip to content

Commit 11cae35

Browse files
JeffreyDallasclaude
andcommitted
ci: start Docker Desktop before switching to Linux engine on Windows
The dockerDesktopLinuxEngine pipe does not exist because Docker Desktop is not running — only the Windows Engine service is active by default. Launch Docker Desktop first, wait up to 3 minutes for the Linux engine pipe to appear, then call SwitchLinuxEngine and set DOCKER_HOST. Increase step timeout to 10 minutes to accommodate Docker Desktop startup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 90a143e commit 11cae35

1 file changed

Lines changed: 19 additions & 7 deletions

File tree

.github/workflows/zxc-e2e-test.yaml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -393,16 +393,28 @@ jobs:
393393
cd ../solo
394394
395395
- name: Switch Docker to Linux Engine (Windows)
396-
# Kind requires Linux containers. On windows-latest, Docker Desktop defaults to Windows
397-
# containers mode. Switching to the Linux engine requires two things:
398-
# 1. Call DockerCli.exe -SwitchLinuxEngine to switch Docker Desktop to Linux mode.
399-
# 2. Set DOCKER_HOST to the Linux engine named pipe — the docker CLI at
400-
# C:\Windows\system32\docker binds to the Windows Engine daemon by default and will
401-
# still report Windows containers even after the switch unless DOCKER_HOST is set.
396+
# Kind requires Linux containers. On windows-latest, Docker Engine runs as a Windows
397+
# service in Windows containers mode — it cannot run Linux images. Docker Desktop
398+
# provides a Linux engine (via Hyper-V/WSL2) but is not started by default.
399+
# Steps:
400+
# 1. Launch Docker Desktop so the Linux engine named pipe is created.
401+
# 2. Wait up to 3 minutes for \\.\pipe\dockerDesktopLinuxEngine to appear.
402+
# 3. Call DockerCli.exe -SwitchLinuxEngine to ensure Linux mode is active.
403+
# 4. Set DOCKER_HOST to the Linux engine pipe and export via GITHUB_ENV so all
404+
# subsequent steps (including Git Bash) bind to the Linux daemon.
402405
if: ${{ runner.os == 'Windows' && !cancelled() && !failure() }}
403-
timeout-minutes: ${{ fromJSON(env.STEP_TIMEOUT_MINUTES) }}
406+
timeout-minutes: 10
404407
shell: pwsh
405408
run: |
409+
Start-Process "$env:ProgramFiles\Docker\Docker\Docker Desktop.exe"
410+
$maxWait = 180
411+
$waited = 0
412+
while ($waited -lt $maxWait) {
413+
if (Test-Path "\\.\pipe\dockerDesktopLinuxEngine") { break }
414+
Write-Host "Waiting for Docker Desktop Linux engine... ($waited/$maxWait s)"
415+
Start-Sleep 5
416+
$waited += 5
417+
}
406418
& "$env:ProgramFiles\Docker\Docker\DockerCli.exe" -SwitchLinuxEngine
407419
$dockerHost = "npipe:////./pipe/dockerDesktopLinuxEngine"
408420
$env:DOCKER_HOST = $dockerHost

0 commit comments

Comments
 (0)