deploy --build-only images not accessible to subsequent deploy --image

We have several apps that we want to deploy as close to simultaneously as possible.
So the plan is to build them all without deploying, then deploy them all.

So first build-only and set a label:

flyctl deploy -a myapp --build-only --label MYLABEL

And then actually deploy the built image:

flyctl deploy -a myapp -i

But I’m getting this error:

Searching for image '' remotely...
Error: failed to fetch an image or build from source:
Could not find image ""


  • If I actually deploy the image (without --build-only) then the myapp:MYLABEL becomes findable…
  • I’m using the exact image name as output by the --build-only step.
  • I’ve successfully used the --image IMAGE flag with an image that I manually pushed to Fly after fly auth docker, but somehow it doesn’t work this way.

Hi @carderne,

I believe you need the --push flag on the above.

1 Like

Oh my bad, thank you!

Not at all! I got caught by that when I first tried the --build-only option, too. It’s a bit more intuitive to have these options separate if you’re building locally than it is when you use a remote builder.

1 Like

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