Skip to content

Instantly share code, notes, and snippets.

@laughingman7743
Created April 10, 2016 07:28
Show Gist options
  • Save laughingman7743/c9869977e474929c9c046f9c9660575d to your computer and use it in GitHub Desktop.
Save laughingman7743/c9869977e474929c9c046f9c9660575d to your computer and use it in GitHub Desktop.
FROM python:2.7
ENV AIRFLOW_VERSION=1.7.0 \
AIRFLOW_HOME=/usr/local/airflow
RUN apt-get update -yqq \
&& apt-get install -yqq --no-install-recommends libmysqlclient-dev \
libpq-dev \
&& useradd -ms /bin/bash -d ${AIRFLOW_HOME} airflow \
&& pip install --no-cache-dir airflow==${AIRFLOW_VERSION} \
airflow[celery]==${AIRFLOW_VERSION} \
airflow[mysql]==${AIRFLOW_VERSION} \
airflow[postgres]==${AIRFLOW_VERSION} \
airflow[hive]==${AIRFLOW_VERSION} \
airflow[s3]==${AIRFLOW_VERSION} \
pytz==2016.1 \
&& apt-get remove --purge -yqq libmysqlclient-dev \
libpq-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
/tmp/* \
/var/tmp/* \
/usr/share/man \
/usr/share/doc \
/usr/share/doc-base
RUN chown -R airflow: ${AIRFLOW_HOME}
EXPOSE 8080 5555 8793
USER airflow
WORKDIR ${AIRFLOW_HOME}
ENTRYPOINT ["airflow"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment