I have a locally built image that I would like fly to deploy, but when I configure fly.toml to reference that local image tag, it keeps trying to get the image from dockerhub, where it doesn’t exist. I know that fly can build an image locally and posh it when a Docker file is present. Is it possible for it to deploy an image I’ve built locally myself?
it’s definitely possible.
here is my deploy script (for podman, so you’d just tweak for docker)
podman login -u x --password $(fly auth token) podman build -t my_app . podman push --format v2s2 my_app docker://registry.fly.io/my_app:latest flyctl deploy -i registry.fly.io/my_app:latest
The image needs to be accessible to our platform when deploying so you need to push to either registry.fly.io or docker hub then deploy the image reference, either with the
--image flag @flyio3 mentioned or in the fly.toml file.
If you’re using docker you can run
flyctl auth docker to configure your credentials then push with
docker push registry.fly.io/app:whateva
Ahh, got it. Thanks, makes sense.
I hadn’t realized I needed to push the image myself. I was configuring the image in the fly.toml, assuming it would push the local image in the same way building a Dockerfile happens locally.