From 3f1c9226d78acdab3ce51106c57f3cf02bf5903d Mon Sep 17 00:00:00 2001 From: Amit Mujawar <1662670+amit10may@users.noreply.github.com> Date: Fri, 7 Oct 2022 16:39:24 +0530 Subject: [PATCH 1/2] Updated default image name Existing image name default causes failure at startup of docker-compose. Might be this extend-airflow image is removed --- docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 907e040fa..3ce7112ed 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -39,7 +39,7 @@ version: '3' x-airflow-common: &airflow-common - image: ${AIRFLOW_IMAGE_NAME:-extending_airflow:latest} + image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:latest} environment: &airflow-common-env AIRFLOW__CORE__EXECUTOR: LocalExecutor From cdad8f69d959b0c682237df1db39979b5d543757 Mon Sep 17 00:00:00 2001 From: Amit Mujawar <1662670+amit10may@users.noreply.github.com> Date: Fri, 7 Oct 2022 17:00:57 +0530 Subject: [PATCH 2/2] Added missing instructions for Linux UID and GID --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8a6fd72c4..e94e8c571 100644 --- a/README.md +++ b/README.md @@ -17,21 +17,26 @@ ## Running apache airflow 2.0 in docker with local executor. Here are the steps to take to get airflow 2.0 running with docker on your machine. 1. Clone this repo -1. Create dags, logs and plugins folder inside the project directory +2. Create dags, logs and plugins folder inside the project directory ```bash mkdir ./dags ./logs ./plugins ``` -1. Install docker desktop application if you don't have docker running on your machine +3. If using Linux - run below command +```bash +echo -e "AIRFLOW_UID=$(id -u)" > .env +echo -e "AIRFLOW_GID=0" >> .env +``` +4. Install docker desktop application if you don't have docker running on your machine - [Download Docker Desktop Application for Mac OS](https://hub.docker.com/editions/community/docker-ce-desktop-mac) - [Download Docker Desktop Application for Windows](https://hub.docker.com/editions/community/docker-ce-desktop-windows) -1. Launch airflow by docker-compose +5. Launch airflow by docker-compose ```bash docker-compose up -d ``` -1. Check the running containers +6. Check the running containers ```bash docker ps ``` -1. Open browser and type http://0.0.0.0:8080 to launch the airflow webserver +7. Open browser and type http://0.0.0.0:8080 to launch the airflow webserver -![](images/screenshot_airflow_docker.png) \ No newline at end of file +![](images/screenshot_airflow_docker.png)