Last active
August 18, 2024 16:47
-
-
Save neybapps/ddbf4e9c44e69190107717d42ddb508b to your computer and use it in GitHub Desktop.
Minimalist Airflow Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python | |
ARG AIRFLOW_USER_HOME=/usr/local/airflow | |
ARG CLOUD_SDK_VERSION=295.0.0 | |
ENV AIRFLOW_HOME=${AIRFLOW_USER_HOME} | |
ENV CLOUD_SDK_VERSION=$CLOUD_SDK_VERSION | |
# Airflow | |
ARG AIRFLOW_VERSION=1.10.10 | |
ARG SQLAlchemy_VERSION=1.10.10 | |
ARG AIRFLOW_USER_HOME=/usr/local/airflow | |
RUN apt-get install -y google-cloud-sdk=${CLOUD_SDK_VERSION}-0 \ | |
gcloud --version | |
RUN pip install --user --upgrade \ | |
SQLAlchemy==SQLAlchemy_VERSION \ | |
apache-airflow[gcp]==AIRFLOW_VERSION \ | |
COPY entrypoint.sh /entrypoint.sh | |
COPY config/airflow.cfg ${AIRFLOW_USER_HOME}/airflow.cfg | |
RUN chown -R airflow: ${AIRFLOW_USER_HOME} | |
EXPOSE 8080 5555 8793 | |
USER airflow | |
WORKDIR ${AIRFLOW_USER_HOME} | |
ENTRYPOINT ["/entrypoint.sh"] | |
CMD ["webserver"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment