Hello,
I’ve deployed my app using the following command in the terminal:
fly deploy --build-only --image-label myapp
Everything went smoothly, and I received this success message:
--> Building image done
image: registry.fly.io/myapp:myapp
image size: 764 MB
However, when I tried to create a new machine using the command below:
fly machines run registry.fly.io/myapp:myapp
I got the following error:
Searching for image 'registry.fly.io/myapp:myapp' remotely...
Error: Could not find image "registry.fly.io/myapp:myapp"
Can anyone help me resolve this issue?
Kind regards,
Gustavo
halfer
March 30, 2025, 6:05pm
2
The normal way to do it is to use flyctl deploy
; try dropping the --build-only
flag.
1 Like
Hey, thanks for your help! So, in my case, these machines are started by another app through the REST API whenever needed, and I was trying to mimic that behavior using the CLI. Any idea how I could do that?
halfer
March 30, 2025, 7:01pm
4
Ah, gotcha. I’m doing similar in my app, though I am using the API. I’d go with:
Normal flyctl deploy
to ensure it works at the app level
flyctl scale count 0
to remove running machines
Then flyctl machine start
when you want a machine
1 Like
Just to augment @halfer ’s answer a little:
(The flags for fly deploy
around this have always been a little confusing…)
1 Like
halfer
March 30, 2025, 7:52pm
7
Ah, I forgot I did this already:
I am playing around with creating and destroying machines individually, it’s a lot of fun.
I noticed this problem today:
halfer@dev:~/$ flyctl machine create \
. \
--config machines/fly.toml \
--rm \
--region lhr \
--vm-memory 256M \
--dockerfile machines/small/Dockerfile \
--name sequoia-browser-small
✓ compatible remote builder found
INFO Override builder host with: https://fly-builder-red-shape-1111.fly.dev (was tcp://[fdaa:5:ffff:a7b:330:eeee:9cf5:2]:1111)
Remo…
system
Closed
April 6, 2025, 7:52pm
8
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.