Search code examples
dockerairflowpodmandockeroperator

Is it possible use Docker operator for podman into Airflow 2.0?


everyone!

I'm learning how to use Airflow 2.0 and creating my DAGs. I want to do somethings like:

docker run ...
docker pull ...

I was reading the documentation and find information about Docker Operator, but I don't know if it works with Podman. Is it possible? I want install Airflow into a RHEL. If the answer is yes, can you show me a simple example like docker hello world?

Thanks


Solution

  • DockerOperator supports and it is tested only with Docker by default. It uses the docker's API client. Podman apparently (https://podman.io/blogs/2020/07/01/rest-versioning.html) as of July last year supports Docker API compatibility, so there is a chance it will work, but there is no guarantee.

    However Airflow is very flexible, and even if DockerOperator will not work out-of-the-box, you can easily add integration via BashOperator for example, if your goal is to run basic commands of podman. That might be much faster route and easier to debug/solve problems.