I am new to docker and I am trying to set up a QA environment of airflow(I already have a production). This is how I defined in the entrypoint.sh
#!/usr/bin/env bash
TRY_LOOP="20"
SLUGIFY_USES_TEXT_UNIDECODE=yes
BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [ "$BRANCH" == 'master' ]
then
"${REDIS_HOST:="airflow-celery.xxxxx.0001.use1.cache.amazonaws.com"}"
else [ "$BRANCH" == 'QA' ]
"${REDIS_HOST:="qa-airflow-celery.xxxx.ng.0001.use1.cache.amazonaws.com"}"
fi
: "${REDIS_PORT:="6379"}"
if [ "$BRANCH" == 'master' ]
then
"${POSTGRES_HOST:="airflow-database.xxxxx.us-east-1.rds.amazonaws.com"}"
"${POSTGRES_USER:="airflow"}"
else [ "$BRANCH" == 'QA' ]
"${POSTGRES_HOST:="qa-airflow-database.xxxxx.us-east-1.rds.amazonaws.com"}"
"${POSTGRES_USER:="airflow"}"
fi
The build runs successfully but it throws a following error when I try to run the docker container and it never starts
/entrypoint.sh: line 6: git: command not found
/entrypoint.sh: line 11: qa-airflow-celery.xxxxx.ng.0001.use1.cache.amazonaws.com: command not found
/entrypoint.sh: line 21: qa-airflow-database.xxxxxxx.us-east-1.rds.amazonaws.com: command not found
I'd really appreciate If i can some help with it.