From Containerfile via podman to fly.io
How to Deploy a Pre-Built Container to fly.io Using Podman
Preface
Many of my services are effectively Rust binaries with a minimal Containerfile. I often have the container image ready to go locally and do not want an external build pass to redo the same work. Consequently, I was looking for a way to deploy container images a while back and found fly.io, which has served the purpose well ever since. Here's a quick, updated guide on how to do it.
Overview
The deployment steps use Podman to push a pre-built container to fly.io. They assume you already have a container image with digest 7a7bb109 and an existing app named buxbunny.
Steps
1. Tag Your Local Image
Assign the image to the fly.io registry:
2. Create a Deploy Token and Log In
Generate a deploy token and use it to authenticate with Podman in one step:
|
3. Push the Image
Upload the tagged image to the fly.io registry:
4. Deploy Using fly.toml
Update fly.toml to use the pre-built image:
#..
[]
= "registry.fly.io/buxbunny:latest"
#..
Then deploy:
Key Notes
- Ensure the registry URL and app name in
fly.tomlmatch your setup - No
Dockerfileor build context is required when using theimagefield
Original source: https://community.fly.io/t/howto-use-podman-instead-of-docker-for-local-builds-and-uploading-container-images/542