Is it possible to use fly-builder to only build images before deployment?

Hi there! I was wondering if it is possible to use the fly-builder in my org to be able to remotely build a Dockerfile before an app deployment? (I just want to build and create an image tag, not deploy)

My use case:

I have a Raft cluster of machines deployed in different regions on Fly. To safely upgrade, the recommendation is to

  1. update the followers of the cluster
  2. spin down leader
  3. a new leader is selected
  4. update the old leader
  5. now all machines are running the updated code

I know I can build an image locally and use that when doing a fly deploy --image XXX. But I run an M2 mac and I’m worried about issues with building on Mac and running on the architecture that Fly uses. (I dunno how much of a problem this is nowadays but it was a problem a while back)

Ideally I’d like to be able to use DOCKER_HOST (which is the fly-builder url) and be able to send off my Dockerfile to be built by the fly-builder and then when I do the following to update specific machines:

fly machines update --image <image ref> <machine ID>

I can then use the registry.fly.io image that was built in the remote builder.

Is it only possible to do something similar if I deploy my own machine with Docker installed to build remotely as seen in this question?

Thanks a lot!

Wait a minute…would the fly deploy --build-only --push accomplish what I need here?

1 Like

Yes :slight_smile:

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