AshMiq Digital
← All posts

Fly.io cheatsheet

Two fixes from 2021 that still work: destroying an app, and amd64 builds from an M1 Mac.

A short one from 2021, kept as a reference. Both of these bit me within the same week.

Permanently destroy an app:

flyctl destroy <APPNAME>

Building a Docker image on an Apple M1 Mac produces linux/arm64 images, which fail to deploy on remote linux/amd64 hosts. Fly rejects it outright, and EC2 warns and tries anyway:

Error Validation failed: Image must be amd64 architecture for linux us
WARNING: The requested image's platform (linux/arm64/v8) does not match
the detected host platform (linux/amd64)

The fix is buildx with an explicit platform, building and pushing in one step:

docker buildx create --name mybuilder
docker buildx use mybuilder
docker buildx build --platform linux/amd64 -t nazmifeeroz/hello-next:amd -f Dockerfile --push .

2026 note: this one survived nearly unchanged — the commands still run as written. Arm servers are mainstream now, so the problem shows up less, but multi-arch images (buildx with --platform linux/amd64,linux/arm64) are still the right answer when you can't control the host.