Skip to content

Instantly share code, notes, and snippets.

@neybapps
Last active June 4, 2020 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neybapps/ddbf4e9c44e69190107717d42ddb508b to your computer and use it in GitHub Desktop.
Save neybapps/ddbf4e9c44e69190107717d42ddb508b to your computer and use it in GitHub Desktop.
Minimalist Airflow Dockerfile
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