針對 Windows 映像檔的 Skaffold 建構作業可能會在 Windows 電腦上失敗,因為 Skaffold 會嘗試為錯誤的目標提取基礎映像檔。
如果發生這個問題,您可能會看到類似以下的錯誤訊息:
Checking cache...
- migrated-image-6jc3z: Error checking cache.
getting hash for artifact "migrated-image-6jc3z": getting dependencies for "migrated-image-6jc3z": parsing ONBUILD instructions: retrieving image "mcr.microsoft.com/dotnet/framework/aspnet:4.8": no child with platform linux/amd64 in index mcr.microsoft.com/dotnet/framework/aspnet:4.8
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Issues with Windows IIS services migration\n==========================================\n\nThis document describes workarounds for some issues that you might\nencounter while migrating Windows IIS services.\n\nWindows IIS deployment marked not ready\n---------------------------------------\n\nThe deployment of Windows IIS workloads might be marked as not ready due\nto short timeouts. If you're deploying your workloads using Skaffold, then\nthe deployment might show as failed.\n\nAs a workaround for this issue, increase the readiness probe timeout and\nperiod using PowerShell: \n\n foreach ($file in (Get-ChildItem . -Recurse -Include \"deployment_spec.yaml\")) { (Get-Content $file).replace(\"periodSeconds: 10\", \"periodSe\n conds: 30\").replace(\"timeoutSeconds: 1\", \"timeoutSeconds: 10\") | Set-Content $file }\n\nSkaffold build for Windows images fails\n---------------------------------------\n\nSkaffold build for Windows images might fail on a Windows machine because\nSkaffold tries to pull the base image for the wrong target.\n\nIf this issue occurs, you might see an error message similar to the following\nmessage: \n\n Checking cache...\n - migrated-image-6jc3z: Error checking cache.\n getting hash for artifact \"migrated-image-6jc3z\": getting dependencies for \"migrated-image-6jc3z\": parsing ONBUILD instructions: retrieving image \"mcr.microsoft.com/dotnet/framework/aspnet:4.8\": no child with platform linux/amd64 in index mcr.microsoft.com/dotnet/framework/aspnet:4.8\n\nAs a workaround for this issue, pull the image manually using the `docker pull`\ncommand, and run the Skaffold build again."]]