flyctl should use podman if available

Just found out that flyctl will build an image locally, if docker daemon is available. I have podman on my system. podman has a docker compatible API. Can flyctl use podman if that’s available? Maybe a config option that can be set in the flyctl config?

It appears you can get it to work via the following answer at HOWTO: Use Podman instead of Docker for local builds and uploading container images - General - Fly.io

Thanks, should have definitely searched before posting. I’m aware that I can push directly to the fly registry, and that thread covers all the gotchas around using podman for this purpose.

Podman is API compatible with docker, so this thread is more me wondering if it would be possible to support this in flyctl itself?

I don’t think we’re averse to supporting it, and I don’t think it’d be especially hard, but I do wonder whether it’s always valid to assume we should be using Podman if it’s available locally. Are there other people here with a take on us taking advantage of local Podman installs?

I haven’t looked at Podman in a while, but last I remember it’s a self contained binary rather than a daemon. Supporting that would mean doubling the current build code. This also wouldn’t work with pack which we use for buildpacks.

I would be interested in embedding libpod someday though.

You could run a root podman as a service, and it would behave exactly like dockerd does. Podman even ships with a docker compatible API, so it can be a drop-in replacement.

A full blown libpod in flyctl sounds more interesting than just switching flyctl to using the docker podman compat API though.

Oh interesting. If it exposes the dockerd api over a socket or tcp port you can probably do DOCKER_HOST=tcp://.... flyctl deploy

That’s exactly what I was looking for, right now. Will post results here in some time.

Awesome thank you!