Skip to content

Commit

Permalink
[stress testing]: Force amd64 as the build platform for images we push (
Browse files Browse the repository at this point in the history
#8484)

Without this building and pushing from ARM Mac's (or any ARM platform) produce images that just fail with mysterious errors because AKS and your local arch don't match.
  • Loading branch information
richardpark-msft authored Jun 21, 2024
1 parent 6df8529 commit 9274648
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)'"
Expand Down

0 comments on commit 9274648

Please sign in to comment.