airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Support for podman in breeze tooling

Open fredthomsen opened this issue 1 year ago • 16 comments

Description

Enable breeze to utilize podman for container management.

Use case/motivation

Given the open source nature, lack of licensing issues, OCI-compliant images, and improved security and performance, enable podman as a container management option for breeze tooling.

Related issues

No response

Are you willing to submit a PR?

  • [x] Yes I am willing to submit a PR!

Code of Conduct

fredthomsen avatar Aug 25 '25 04:08 fredthomsen

I believe most people already use podman and there are little to no incompatibilities, but if you feel like testing it and adding documentation explicitly and solve any problems you might see - feel absolutely free to work on it and updating documenetation.

Ideally also it would be great if some basic testing is added in our CI to test that breze works with podman - building images with podman maybe, running some shell commands with breeze maybe runing some pre-commits that require docker container.

potiuk avatar Aug 25 '25 10:08 potiuk

I see there is an attempting to keep the CLI interfaces the same for scripting, BUT there are some issues I am running into the buildx area, and I'll work through these are part of this ticket.

fredthomsen avatar Aug 25 '25 21:08 fredthomsen

I can take the issue. Thanks.

aaron-wolmutt avatar Nov 23 '25 00:11 aaron-wolmutt

I opened a PR #58599 to add a warning in breeze that podman isn't fully supported yet. I will hopefully be able to add the full support podman including tests.

aaron-wolmutt avatar Nov 23 '25 19:11 aaron-wolmutt

Cool. Merged and back-ported,

potiuk avatar Nov 23 '25 21:11 potiuk

I don't think full support of podman is possible yet. One way to approach it would be to create new separate containers that are podman friendly. The syntax isn't easily recognized by podman engine. Heredoc isn't recognized yet, even though podman claims to support it after 4.8

Image

aaron-wolmutt avatar Dec 17 '25 03:12 aaron-wolmutt

I think it should - it's the matter of using buildkit for building the images. The declaration at the top of the Dockerfile tells which version of syntax to use:

# syntax=docker/dockerfile:1.4

Maybe you should look at how to enable buildkit support for podman - this should work for any container engine, buildkit is delivered by moby (they are behind docker) - but it is really an oci-standard container and should run also with podman.

There are many sources on setting up podman to use buildkit.

potiuk avatar Dec 17 '25 11:12 potiuk

I can get the image builds to start with podman outside of breeze. Looks like it is possible to build the images with

# run podmans buldkit container
podman run -d --name buildkitd --privileged \
     docker.io/moby/buildkit:latest

and

buildctl --addr=podman-container://buildkitd build \
   --frontend dockerfile.v0 \
   --local context=. \
   --local dockerfile=. \
   --export-cache type=inline \
   --output type=docker,name=mynewimage | podman load

Or for the ci image build

buildctl build \
  --frontend=dockerfile.v0 \
  --local context=. \
  --local dockerfile=. \
  --opt filename=Dockerfile.ci \
  --opt target=main \
  --opt platform=linux/amd64 \
  --output type=docker,name=example:latest \
  --progress=plain | podman load

So would we want to add the podman buildkit image build to breeze? I noticed that buildkit detection is already in breeze.

# dev/breeze/src/airflow_breeze/utils/run_utils.py

def check_if_buildx_plugin_installed() -> bool:
    """
    Checks if buildx plugin is locally available.

    :return True if the buildx plugin is installed.
    """
    check_buildx = ["docker", "buildx", "version"]
    docker_buildx_version_result = run_command(
        check_buildx,
        no_output_dump_on_exception=True,
        capture_output=True,
        text=True,
        check=False,
    )
    if docker_buildx_version_result.returncode == 0:
        return True
    return False

aaron-wolmutt avatar Dec 19 '25 03:12 aaron-wolmutt

Likely, Have a persistent config to use podman (see breeze config) and if set - the build stteps should be replaced by podman commands.

potiuk avatar Dec 19 '25 18:12 potiuk

Likely, Have a persistent config to use podman (see breeze config) and if set - the build stteps should be replaced by podman commands.

I added some more support warnings based on this discussion to a PR #59775

aaron-wolmutt avatar Dec 23 '25 23:12 aaron-wolmutt

@aaron-wolmutt We are unassigning you from this issue as part of our updated assignment policy.

This is not meant to discourage your contribution — quite the opposite! You are still very welcome to work on this issue and submit a PR for it. Simply comment that you are working on it and open a PR when ready.

We found that formal assignments were not working well, as they often prevented others from contributing when the assignee was not actively working on the issue.

potiuk avatar Mar 02 '26 19:03 potiuk

@fredthomsen We are unassigning you from this issue as part of our updated assignment policy.

This is not meant to discourage your contribution — quite the opposite! You are still very welcome to work on this issue and submit a PR for it. Simply comment that you are working on it and open a PR when ready.

We found that formal assignments were not working well, as they often prevented others from contributing when the assignee was not actively working on the issue.

potiuk avatar Mar 02 '26 19:03 potiuk

Can I work on this.

ajayboddeda-dev avatar Aug 12 '26 06:08 ajayboddeda-dev

@ajayboddeda-dev feel free to create a PR. By project policy, we do not assign people to issues - https://github.com/apache/airflow/blob/main/contributing-docs/04_how_to_contribute.rst#contribute-code-changes

Miretpl avatar Aug 15 '26 21:08 Miretpl

Hi, I'd like to work on Podman support in Breeze. Is this still available to pick up?

ayushmishra-18 avatar Nov 08 '26 09:11 ayushmishra-18

@ayushmishra-18, no PR linked, so I assume yes. Feel free to create one!

Miretpl avatar Nov 15 '26 00:11 Miretpl