From ebc383e615159208b460156756294c0591840b59 Mon Sep 17 00:00:00 2001 From: Kirill Tsukanov Date: Sun, 5 Nov 2023 07:50:34 +0000 Subject: [PATCH] docs: rewrite section to add user ID --- docs/development/airflow.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/development/airflow.md b/docs/development/airflow.md index efeb059c1..bade2ded6 100644 --- a/docs/development/airflow.md +++ b/docs/development/airflow.md @@ -49,11 +49,15 @@ docker build . --tag extending_airflow:latest ### Set Airflow user ID !!!note Setting Airflow user ID - This command allows Airflow running inside Docker to access the credentials file which was generated earlier. + These commands allow Airflow running inside Docker to access the credentials file which was generated earlier. ```bash -USER_ID=$(id -u) -sed -Ei "s|^AIRFLOW_UID=.*|AIRFLOW_UID=${USER_ID}|" .env +# If any user ID is already specified in .env, remove it. +grep -v "AIRFLOW_UID" .env > .env.tmp +# Add the correct user ID. +echo "AIRFLOW_UID=$(id -u)" >> .env.tmp +# Move the file. +mv .env.tmp .env ``` ### Initialise