Issues Dockerizing a Vapor project in M2
Swift
Issues Dockerizing a Vapor project in M2
Fly CLI + Docker on M1/M2 architecture caused issues, so I switched to GitHub Actions for deployment. No more problem!
On this page
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.