MacOS Ventura: buildx not solving "exec /bin/sh: exec format error" problems

MacOS ARM64 processors require multi-architecture builds using ‘docker buildx’ to properly execute on Linux AMD64 architectures, such as those common to Google Cloud Platform. The ‘docker buildx’ command is specifically designed for use cases such as this, and as recently as several months ago I was using this command for precisely this purpose. Within the last few weeks I have noticed this solution has begun to fail. Whether this is concurrent with my upgrade to MacOS Ventura, I do not know. Is the community reporting this problem?

buildx itself will not solve the exec format error. That error happens for example when you are using a binary on arm64 which was actually built for amd64. So you need to make sure that the container you are using has the right architecture (platform). If it doesn’t, you have to find out why.

Based on your other topic, I feel ther is a misunderstanding here

If you for example replaced your multiarch image with a single arch image on Docker Hub, you will get the wrong image with incompatible binaries.

Yes. Agreed. Referencing the specific multi-architecture discussion in the other thread is helpful for the discussion of general purpose multi-architecture builds. I am nearly certain I appropriately pushed the multi-architecture arm64/amd64 build to a fresh hub registry and, running the multi-architecture build on a GCP VM, still received the exec format error. This is what alarmed me to write this post. I have solved the exec format error problem previously with these same hardware devices (MacBook M1 locally and GCP VM) using the multi-architecture buildx solution. I will double check tonight that this problem persists with more careful inspection.

Hi !
I am also facing the same issue. I am using the docker buildx build command but still I am getting the same error when I am running the image on GCP.
Have you solved this issue ?