Issues Dockerizing a Vapor project in M2

2023.06.09

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.