Airflow In Windows — Docker

Sai Bharath Kothakota
2 min readSep 7, 2021

This is page is created for the people who needs guidance in running Airflow through Docker in their local windows machines.

Step 1:

Download the yaml file by clicking on it.

Step 2:

Create the below directories where you have downloaded the yaml file. You can create them manually or you can use windows PowerShell.

mkdir ./dags 
mkdir ./logs
mkdir ./plugins

Step 3:

In the same directory one .env file would have been created. Edit that file in Notepad and paste these two lines lines that file and save it.

AIRFLOW_UID=50000
AIRFLOW_GID=0

Step 4:

Run the DB init script for Airflow to setup backend DB and a first user to login to the Airflow.

docker-compose up airflow-init

After Initialization you will something like below:

airflow-init_1       | Upgrades done
airflow-init_1 | Admin user airflow created
airflow-init_1 | 2.1.3
start_airflow-init_1 exited with code 0

Step 5:

Its time to make the server UP

docker-compose up

Once you the docker-compose up ran successfully without any errors you should be able to see the Airflow UI with this url:- http://localhost:8080/home it might ask for username and password. For the first time it will be airflow. You can change that if you want.

If you want yo bring it down.

docker-compose down

Resources:

https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html

--

--