-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
41 lines (31 loc) · 1.38 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
40
41
FROM ubuntu:18.04
ENV PYTHONDONTWRITEBYTECODE 1
ARG BUILD_DATE
ARG AIRFLOW_VERSION=1.10.7
ARG AIRFLOW_EXTRAS=async,crypto,jdbc,postgres,ssh,kubernetes
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 -y purge python2.7-minimal \
&& apt-get install -y python3-dev python3-pip wget gcc g++ netcat git ca-certificates libpq-dev curl --no-install-recommends \
&& pip3 install --upgrade setuptools \
&& pip3 install --no-cache-dir apache-airflow[$AIRFLOW_EXTRAS]==$AIRFLOW_VERSION "marshmallow-sqlalchemy<=0.19.0" \
&& apt-get remove -y --purge gcc g++ git curl \
&& apt autoremove -y \
&& apt-get clean -y \
&& ln -s /usr/bin/python3 /usr/bin/python
ARG SPARK_VERSION=2.4.4
ENV SPARK_HOME /usr/spark
ENV PATH="/usr/spark/bin:${PATH}"
RUN wget -q "http://archive.apache.org/dist/spark/spark-${SPARK_VERSION}/spark-${SPARK_VERSION}-bin-hadoop2.7.tgz" && \
tar xzf "spark-${SPARK_VERSION}-bin-hadoop2.7.tgz" && \
rm "spark-${SPARK_VERSION}-bin-hadoop2.7.tgz" && \
mv "spark-${SPARK_VERSION}-bin-hadoop2.7" /usr/spark
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"]