Can I clone a Fly machine for which Fly built the docker image on my behalf?

If I previously launched a new Fly machine by specifying the dockerfile, can I spin up a new machine and specify that image in my config?

I get the error: {"error":"Authentication required to access image \"docker.io/library/fly-machines:deployment-01GPYM48RWAP9GHWKWP0FNRE4D\""}

when I try to run the command:
% curl -i -X POST
-H “Authorization: Bearer ${FLY_API_TOKEN}” -H “Content-Type: application/json”
http://${FLY_API_HOSTNAME}/v1/apps/fly-machines/machines”
-d ‘{
“name”: “fly-machines”,
“config”: {
“image”: “fly-machines:deployment-01GPYM48RWAP9GHWKWP0FNRE4D”
}
}’
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json; charset=utf-8
Fly-Trace-Id: 9ed10560e0fe00728fca54a78db37759
Date: Tue, 17 Jan 2023 22:24:08 GMT
Content-Length: 125

Yes! But you need the full Docker image URL:

“image”: “registry.fly.io/fly-machines:deployment-01GPYM48RWAP9GHWKWP0FNRE4D”
1 Like