creamy-insurance-89840
08/21/2023, 8:49 AMerror: ERROR: Multiple platforms feature is currently not supported for docker driver. Please switch to a different driver (eg. "docker buildx create --use")
I have '--platform', 'linux/amd64,linux/arm64'
as extraOptions.
Is there any way to use this with awsx.ecr.Image?
I'm using MAC M1proud-art-41399
08/21/2023, 1:39 PMdocker build
under the hood. To build the Docker image for multiple platforms, you need to use BuildKit builder. To use BuildKit as the default builder, you need to create a new builder instance and use it using
docker buildx create --use
which is exactly what the error message says. (Otherwise, without using --use
you would have to build the image with docker buildx build
to use BuildKit, which is not what the Pulumi Docker v3 is doing.)creamy-insurance-89840
08/21/2023, 1:42 PMproud-art-41399
08/21/2023, 1:47 PMdocker buildx create --use
command before running pulumi up
. That will create the BuildKit instance and actually use it, which means calling docker build
will effectively mean docker buildx build
. If you provision the resources during CI pipeline, do it before the provisioning step. E.g. for GitHub Actions there's setup-buildx-action that will do it for you. (You'll also need the setup-qemu-action to build for multiple platforms on the x86 GitHub runners.)creamy-insurance-89840
08/21/2023, 2:53 PMdocker buildx create --use
on my local machine or? Because I did and I still get the same errorsalmon-account-74572
08/21/2023, 9:57 PMawsx.ecr.Image
using an embedded v3 Docker provider), but what I’ve done in the past is specify only linux/amd64
since most of the systems I deploy on AWS are x86_64.
In theory, you should also be able to use the Docker v4 provider to build the image, and then push it separately (instead of using awsx.ecr.Image
). I haven’t tested that yet.creamy-insurance-89840
08/21/2023, 10:12 PMsalmon-account-74572
08/21/2023, 10:18 PMcreamy-insurance-89840
08/21/2023, 10:20 PMsalmon-account-74572
08/21/2023, 11:09 PMproud-art-41399
08/22/2023, 8:03 AM