Remote docker build fails

I am trying to get remote builder to build my docker image and push it to registry using:

flyctl deploy --build-only --remote-only --no-cache --push --image --image-label latest -a APPNAME --verbose

What I back is:

==> Verifying app config Validating /Users/philip/projects/.../fly.toml ✓ Configuration is valid --> Verified app config ==> Building image Searching for image '' remotely... Error: failed to fetch an image or build from source: image must be amd64 architecture for linux os, found arm64 linux
Now, I did try building and pushing an image directly to from my Mac (knowing it won’t really run). So I am stuck now?

From what I can see, there is no way to specify what platform to use when running the fly build command, so I would reccomend building the image first using the docker build --platform=linux/amd64 command, then pushing it to fly registry, and then deploying the app.

Let me know if you get stuck

Are you building from a Dockerfile or trying to use an existing image?

Thanks for the replies guys. The image is based on:

FROM python:3.11-slim as python-base

I ended up moving the whole thing over into GH actions (where it truly belongs, tbh). Sharing my workflow code for the posterity:

name: Fly Images
      - "server/workers/**"
    runs-on: ubuntu-latest
    name: Run tests
      - uses: actions/checkout@v4

      - name: Run tests
        working-directory: "server/workers"
        run: docker build --no-cache --target test .
    name: Build and push worker image
    needs: tests
    runs-on: ubuntu-latest
    concurrency: deploy-group
      FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
      - uses: actions/checkout@v4
      - uses: superfly/flyctl-actions/setup-flyctl@master
      - name: Auth Fly Docker
        run: flyctl auth docker
      - name: Build docker image
        working-directory: "server/workers"
        run: docker build -t .
      - name: Push docker image
        run: docker push

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.