/airflow-mssql

Dockerfile to extend Airflow docker image(s) to support Microsoft SQL Server

Primary LanguageDockerfile

What is airflow-mssql?

A Dockerfile that extends Bitnami's docker airflow image(s) to include the bits necessary to support Microsoft SQL Server (mssql). It uses a multi-stage build to keep the final image clean. It has been generalized to work with all three airflow images (airflow, worker, scheduler).

Why is this necessary?

Bitnami's images do not include Microsoft drivers or pyodbc. You can read more at my blog if interested.

How to use

docker build --build-arg IMAGE=airflow -t airflow:latest .
docker build --build-arg IMAGE=airflow-worker -t airflow-worker:latest .
docker build --build-arg IMAGE=airflow-scheduler -t airflow-scheduler:latest .

Sample DAG

I could not find much in the way of a working example DAG to test mssql so I also created this quick example DAG to test connectivity.