forked from godatadriven-dockerhub/airflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (32 loc) · 1.33 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
ARG PYTHON_VERSION=3.6
FROM godatadriven/miniconda:${PYTHON_VERSION}
ENV PYTHONDONTWRITEBYTECODE 1
ENV SLUGIFY_USES_TEXT_UNIDECODE yes
ARG BUILD_DATE
ARG AIRFLOW_VERSION
ARG AIRFLOW_EXTRAS=async,celery,crypto,jdbc,hdfs,hive,azure,gcp_api,emr,password,postgres,slack,ssh
LABEL org.label-schema.name="Apache Airflow ${AIRFLOW_VERSION}" \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.version=$AIRFLOW_VERSION
RUN set -x\
&& apt-get update \
&& apt-get install -y gcc g++ netcat git ca-certificates --no-install-recommends \
&& if [ "$AIRFLOW_VERSION" = "1.8.2" ]; then\
conda install -y pip==9;\
fi\
&& if [ "$AIRFLOW_VERSION" = "master" ]; then\
pip install --no-cache-dir git+https://github.com/apache/incubator-airflow/#egg=apache-airflow[$AIRFLOW_EXTRAS];\
elif [ -n "$AIRFLOW_VERSION" ]; then\
pip install --no-cache-dir apache-airflow[$AIRFLOW_EXTRAS]==$AIRFLOW_VERSION;\
else\
pip install --no-cache-dir apache-airflow[$AIRFLOW_EXTRAS];\
fi\
&& apt-get remove -y --purge gcc g++ git \
&& apt autoremove -y \
&& apt-get clean -y
COPY entrypoint.sh /scripts/
RUN chmod +x /scripts/entrypoint.sh
WORKDIR /root/airflow
VOLUME ["/root/airflow/dags", "/root/airflow/logs"]
ENTRYPOINT ["/scripts/entrypoint.sh"]
CMD ["--help"]