I am using the Dockerfile to build it. I think I ran into this in the past once or twice and fixed it by destroying the fly builder and deploying again. This time this did not succeed. I also tried to scale the app to dedicated vms and deployed again using --no-cache to see if that makes a difference. So far always “Illegal Instruction”.
I’m experiencing a similar error, in my case, it’s a Next.js app that used to work before yesterday downtime and when I redeployed it, now it doesn’t work, I had to rollback to an old image to make it work. My first thought was that something changed on the underlying architecture after the Consul cluster rebuilt but I’m not sure to be honest.
It’s hard to tell without the raw logs. This sounds like the kind of error that can happen with local Docker builds on arm (on an m1 mac, for example). We’ve seen other edge cases that can cause similar errors, but they’re pretty rare. If you post the complete build log here you may get more useful information from the community.
I have now deployed using fly deploy --no-cache --local-only
(before that I did update Docker for Mac) and the deploy ran way slower (network I guess) but the deploy was successful and interestingly: the binary now runs on the fly server without “Illegal Instruction”.
Not sure what it means though. I would have expected the local build to cause even more issues (that’s why I did not try it before) because I expected that my M2 Mac is a different architecture to the one on fly.
That said: there are so many moving parts involved that I’m not certain whether me using --local-only flag fixed it or something else.