-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
The Container Registry likes to have a linux/amd64 image.
However, when running the scripts on a Macbook it gets build with the linux/arm64 platform by default resulting in the following error:
Updating Container App with new image...
- Running ..ERROR: Failed to provision revision for container app 'ca-web-grb345qzdhluq'. Error details: The following field(s) are either invalid or missing. Field 'template.containers.ca-web-grb345qzdhluq.image' is invalid with details: 'Invalid value: "crgrb345qzdhluq.azurecr.io/ai-foundry-agent/web-dev:azd-deploy-1764155623": image OS/Arc must be linux/amd64 but found linux/arm64';..
Write-Error: Container deployment failed: Container app update failed
I've added the --platform parameter in the build-and-deploy-container.ps1 file to fix this issue.
$dockerfilePath = Join-Path "deployment" "docker" "frontend.Dockerfile"
docker build `
--platform linux/amd64 `
--build-arg ENTRA_SPA_CLIENT_ID=$ClientId `
--build-arg ENTRA_TENANT_ID=$TenantId `
-f $dockerfilePath `
-t $imageName `
. 2>&1 | Out-Host
$buildOutput = az acr build `
--registry $AcrName `
--image "ai-foundry-agent/web-dev:$imageTag" `
--platform linux/amd64 `
--build-arg ENTRA_SPA_CLIENT_ID=$ClientId `
--build-arg ENTRA_TENANT_ID=$TenantId `
--file $dockerfilePath `
--no-logs `
. 2>&1Metadata
Metadata
Assignees
Labels
No labels