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

Co-authored-by: Richard Park <ripark\@microsoft.com>
This commit is contained in:
Azure SDK Bot 2024-06-21 15:18:02 -04:00 коммит произвёл GitHub
Родитель 5cb1f2cfd8
Коммит 1cb24c9157
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -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)'"