This is because without runAsRoot this takes a few pre-cached Linux binaries and packages them up in a tarball. Something macOS can do fine. However runAsRoot works by actually running the container layer as part of the build. A Linux binary can’t run on a macOS machine so it fails. At least this is what I am expecting is happening
Aha, I expected to run in the Docker container like the RUN command in a Dockerfile.
Does this mean you can only use runAsRoot when you’re on the Linux architecture as the container that your’e building? If so, I think that would be a great thing to add to the documentation, because that seems like a pretty large limitation and I could have prevented myself from going down this very deep rabbit hole if that had been documented.