-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (30 loc) · 1.19 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
42
FROM centos/python-35-centos7
MAINTAINER gorskimariusz13@gmail.com
LABEL "com.gorskimariusz.project"="pw-bd-project"
USER root
RUN mkdir -p /jupyter/
WORKDIR /tmp/
COPY jupyter_notebook_config.py /opt/app-root/src/.jupyter/
RUN wget http://www-eu.apache.org/dist/spark/spark-2.2.2/spark-2.2.2-bin-hadoop2.7.tgz
RUN tar -xzf spark-2.2.2-bin-hadoop2.7.tgz
RUN mv spark-2.2.2-bin-hadoop2.7 /opt/spark-2.2.2
RUN ln -s /opt/spark-2.2.2 /opt/spark
RUN curl https://bintray.com/sbt/rpm/rpm | tee /etc/yum.repos.d/bintray-sbt-rpm.repo
RUN yum -y install java-1.8.0-openjdk-devel vim sbt
ENV LD_LIBRARY_PATH /opt/rh/rh-python35/root/usr/lib64:/opt/rh/rh-nodejs6/root/usr/lib64:/opt/rh/httpd24/root/usr/lib64
ENV SPARK_HOME /opt/spark
ENV JAVA_HOME /usr/
ENV SPARK_SBIN_HOME /opt/spark/sbin
ENV SPARK_BIN_HOME /opt/spark/bin
ENV PYTHONPATH $SPARK_HOME/python:$SPARK_HOME/python/lib/py4j-0.10.6-src.zip
ENV PATH $SPARK_BIN_HOME:$SPARK_SBIN_HOME:$JAVA_HOME:$SPARK_HOME:$LD_LIBRARY_PATH:$PATH
RUN pip install --upgrade pip
RUN pip install pip-tools
RUN pip install jupyter
RUN pip install findspark
RUN pip install pyspark
RUN pip install kafka-python
RUN pip install faker
WORKDIR /app
COPY . .
RUN sbt clean assembly