Skip to content

Commit

Permalink
update Airflow dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
m-o-d-e-r committed Jun 10, 2024
1 parent 753c9b2 commit 2cb29f8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions burrito/airflow/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ FROM apache/airflow:2.9.1-python3.10
ENV PATH="/opt/pysetup/.venv/bin:$PATH"
ENV PYTHONPATH="${PYTHONPATH}:/opt/burrito_project"

RUN mkdir -p /opt/airflow/{config,dags,logs,plugins} \
&& chmod 777 /opt/airflow/{config,dags,logs,plugins}

COPY ./burrito/airflow/ /opt/airflow/

COPY --from=build-base /opt/pysetup/ /opt/pysetup/
COPY ./preprocessor_config.json /opt/burrito_project/burrito/preprocessor_config.json
COPY ./CONTRIBUTORS.md /opt/burrito_project/burrito/CONTRIBUTORS.md
Expand Down
20 changes: 20 additions & 0 deletions tests/build_airflow_image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

RED_COLOR="\e[31m"
RESET_COLOR="\e[0m"

docker build -t burrito-airflow-test -f burrito/airflow/Dockerfile .

if [[ $? != 0 ]]; then
echo -e "\n\t${RED_COLOR}Failed to build image${RESET_COLOR}"
exit
fi

docker tag burrito-airflow-test localhost:5000/burrito-airflow-test

docker push localhost:5000/burrito-airflow-test

if [[ $? != 0 ]]; then
echo -e "\n\t${RED_COLOR}Failed to push image${RESET_COLOR}"
exit
fi

0 comments on commit 2cb29f8

Please sign in to comment.