Created
February 16, 2017 20:51
-
-
Save jgerardsimcock/980924f05f90d611bc934f689dc98818 to your computer and use it in GitHub Desktop.
Dockerfile for Airflow installation on osdc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# VERSION 1.7.1.3-7 | |
# AUTHOR: Matthieu "Puckel_" Roisil | |
# DESCRIPTION: Basic Airflow container | |
# BUILD: docker build --rm -t puckel/docker-airflow . | |
# SOURCE: https://github.com/puckel/docker-airflow | |
FROM debian:jessie | |
MAINTAINER Puckel_ | |
# Never prompts the user for choices on installation/configuration of packages | |
ENV DEBIAN_FRONTEND noninteractive | |
ENV TERM linux | |
# Airflow | |
ARG AIRFLOW_VERSION=1.7.1.3 | |
ENV AIRFLOW_HOME /usr/local/airflow | |
# Define en_US. | |
ENV LANGUAGE en_US.UTF-8 | |
ENV LANG en_US.UTF-8 | |
ENV LC_ALL en_US.UTF-8 | |
ENV LC_CTYPE en_US.UTF-8 | |
ENV LC_MESSAGES en_US.UTF-8 | |
ENV LC_ALL en_US.UTF-8 | |
#Some stuff we need for OSDC | |
ENV http_proxy=http://cloud-proxy:3128 | |
ENV https_proxy=http://cloud-proxy:3128 | |
RUN set -ex \ | |
&& buildDeps=' \ | |
python-dev \ | |
libkrb5-dev \ | |
libsasl2-dev \ | |
libssl-dev \ | |
libffi-dev \ | |
build-essential \ | |
libblas-dev \ | |
liblapack-dev \ | |
libpq-dev \ | |
librabbitmq-dev\ | |
' \ | |
&& echo "deb http://http.debian.net/debian jessie-backports main" >/etc/apt/sources.list.d/backports.list \ | |
&& apt-get update -yqq \ | |
&& apt-get install -yqq --no-install-recommends \ | |
$buildDeps \ | |
python-pip \ | |
apt-utils \ | |
curl \ | |
netcat \ | |
locales \ | |
&& apt-get install -yqq -t jessie-backports python-requests \ | |
&& sed -i 's/^# en_US.UTF-8 UTF-8$/en_US.UTF-8 UTF-8/g' /etc/locale.gen \ | |
&& locale-gen \ | |
&& update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 \ | |
&& useradd -ms /bin/bash -d ${AIRFLOW_HOME} airflow \ | |
&& python -m pip install -U pip \ | |
&& pip install Cython \ | |
&& pip install pytz==2015.7 \ | |
&& pip install pyOpenSSL \ | |
&& pip install ndg-httpsclient \ | |
&& pip install pyasn1 \ | |
&& pip install airflow[crypto,celery,all_dbs,s3,hive,hdfs,jdbc,rabbitmq,slack]==$AIRFLOW_VERSION \ | |
&& pip install celery[redis,librabbitmq,sqlalchemy,auth]==3.1.17 \ | |
&& apt-get remove --purge -yqq $buildDeps \ | |
&& apt-get clean \ | |
&& rm -rf \ | |
/var/lib/apt/lists/* \ | |
/tmp/* \ | |
/var/tmp/* \ | |
/usr/share/man \ | |
/usr/share/doc \ | |
/usr/share/doc-base | |
COPY script/entrypoint.sh /entrypoint.sh | |
COPY config/airflow.cfg ${AIRFLOW_HOME}/airflow.cfg | |
RUN chown -R airflow: ${AIRFLOW_HOME} | |
EXPOSE 8080 5555 8793 | |
USER airflow | |
WORKDIR ${AIRFLOW_HOME} | |
ENTRYPOINT ["/entrypoint.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment