9 months ago

Issues Dockerizing a Vapor project in M2

It turns out that telling the Fly CLI to build with a local Docker is insufficient. When run in an M1 or M2 architecture, Docker uses QEMU to cross-compile the binary, and that causes the issues that I was seeing. To fix it, I could have configured Docker to use Rosetta, but instead, I decided to run the deployment from a GitHub Action. Due to the GitHub Actions environment’s architecture, issues don’t arise, and I was able to deploy the app successfully.

About Pedro Piñera

I created XcodeProj and Tuist, and co-founded Tuist Cloud. My work is trusted by companies like Adidas, American Express, and Etsy. I enjoy building delightful tools for developers and open-source communities.