Force amd64 as the build platform - it has to match what the AKS cluster is running on. (#5738)

Co-authored-by: Richard Park <ripark\@microsoft.com>
This commit is contained in:
Azure SDK Bot 2024-06-21 15:18:06 -04:00 committed by GitHub
parent 7d463cd596
commit 8750d80f07
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -285,7 +285,10 @@ function DeployStressPackage(
Write-Host "Setting DOCKER_BUILDKIT=1"
$env:DOCKER_BUILDKIT = 1
$dockerBuildCmd = "docker", "build", "-t", $imageTag, "-f", $dockerFile
# Force amd64 since that's what our AKS cluster is running. Without this you
# end up inheriting the default for our platform, which is bad when using ARM
# platforms.
$dockerBuildCmd = "docker", "build", "--platform", "linux/amd64", "-t", $imageTag, "-f", $dockerFile
foreach ($buildArg in $dockerBuildConfig.scenario.GetEnumerator()) {
$dockerBuildCmd += "--build-arg"
$dockerBuildCmd += "'$($buildArg.Key)'='$($buildArg.Value)'"