Is there a way to deploy Airflow with Docker but using different workers? Is there a way to deploy Airflow with Docker but using different workers? docker docker

Is there a way to deploy Airflow with Docker but using different workers?


I would not go with workflow specific Airflow images, because the approach does not scale. That is, if you had, for example, ten workflows with custom Airflow-worker images each, and you decided to upgrade Airflow, you would have to upgrade each of those custom images.

To deal with conflicting dependencies in Python environments, there are virtual environments. Airflow has PythonVirtualenvOperator that allows executing Python callables inside a new Python virtual environment containing exactly the dependencies the callable needs. This way, in the same workflow (DAG), you can have multiple tasks with completely different set of dependencies each.