@@ -6,6 +6,8 @@ ENV TERM linux
66
77# Airflow
88ARG AIRFLOW_VERSION=1.7.1.3
9+ ARG AIRFLOW_REPO_URL=https://github.com/apache/incubator-airflow.git
10+ ARG AIRFLOW_COMMIT=fe037d6
911ENV AIRFLOW_HOME /usr/local/airflow
1012
1113# Define en_US.
@@ -18,39 +20,45 @@ ENV LC_ALL en_US.UTF-8
1820
1921RUN set -ex \
2022 && buildDeps=' \
21- python-pip \
22- python-dev \
23+ python3-dev \
2324 libkrb5-dev \
2425 libsasl2-dev \
2526 libssl-dev \
2627 libffi-dev \
2728 build-essential \
2829 libblas-dev \
2930 liblapack-dev \
31+ libpq-dev \
32+ libxml2-dev \
33+ libxslt1-dev \
3034 ' \
31- && echo "deb http://http.debian.net/debian jessie-backports main" >/etc/apt/sources.list.d/backports.list \
3235 && apt-get update -yqq \
3336 && apt-get install -yqq --no-install-recommends \
3437 $buildDeps \
3538 apt-utils \
3639 curl \
3740 netcat \
3841 locales \
39- && apt-get install -yqq -t jessie-backports python-requests libpq-dev \
4042 && sed -i 's/^# en_US.UTF-8 UTF-8$/en_US.UTF-8 UTF-8/g' /etc/locale.gen \
4143 && locale-gen \
4244 && update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 \
4345 && useradd -ms /bin/bash -d ${AIRFLOW_HOME} airflow \
46+ && pip install --upgrade pip \
4447 && pip install pytz==2015.7 \
4548 && pip install cryptography \
4649 && pip install pyOpenSSL \
4750 && pip install ndg-httpsclient \
4851 && pip install pyasn1 \
4952 && pip install psycopg2 \
50- && pip install google-api-python-client>=1.5.0, <1.6.0 \
51- && pip install oauth2client>=2.0.2, <2.1.0 \
53+ && pip install requests \
54+ && pip install 'google-api-python-client>=1.5.0,<1.6.0' \
55+ && pip install 'oauth2client>=2.0.2,<2.1.0' \
5256 && pip install httplib2 \
53- && pip install -e git+http://github.com/markovianhq/incubator-airflow.git#egg=airflow \
57+ && git clone ${AIRFLOW_REPO_URL} \
58+ && cd incubator-airflow \
59+ && git checkout ${AIRFLOW_COMMIT} \
60+ && pip install -e . \
61+ && cd .. \
5462 && apt-get remove --purge -yqq $buildDeps libpq-dev \
5563 && apt-get clean \
5664 && rm -rf \
@@ -62,7 +70,6 @@ RUN set -ex \
6270 /usr/share/doc-base
6371
6472COPY script/entrypoint.sh ${AIRFLOW_HOME}/entrypoint.sh
65- COPY config/airflow.cfg ${AIRFLOW_HOME}/airflow.cfg
6673
6774RUN chown -R airflow: ${AIRFLOW_HOME} \
6875 && chmod +x ${AIRFLOW_HOME}/entrypoint.sh
0 commit comments