https://pulumi.com logo
#aws
Title
# aws
d

damp-school-17708

06/24/2021, 1:54 PM
Hi, I've just started to use the handy
new awsx.ecs.FargateService
therefore I am building docker images via pulumi, I am on an M1 mac, which means that if I try to build and push to ECR/ECS an image it will be in the wrong architecture to run in ECS later on. Do you know if there's a way to force buildx to build for a certain architecture? Or a way to pass the flag to pulumi? Thanks
m

millions-furniture-75402

06/24/2021, 1:58 PM
This will enable buildkit, but to have it use
buildx
instead of
build
, you might be best taking docker’s advice of aliasing
buildx
to
build
Copy code
image: awsx.ecs.Image.fromDockerBuild(`${appName}-image`, {
          env: {
            DOCKER_BUILDKIT: "1",
          },
        }),
d

damp-school-17708

06/24/2021, 2:01 PM
thanks yes I did alias docker build to docker buildx but I also want to make sure that when I build an image with pulumi I do a buildx for the right platform (not M1)
but I guess I can pass a param in the env there
actually no I can't because it's a param.. such as
Copy code
--platform linux/amd64,linux/arm64,linux/ppc64le
🤯