forked from spark-jobserver/spark-jobserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.test
39 lines (29 loc) · 1.22 KB
/
Dockerfile.test
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
FROM openjdk:8-jdk
USER root
# Python version shoule be < 3.8 as it is the last Python version, which works with Spark 2.4
ARG PYTHON_VERSION=3.6.0
RUN apt-get -qq update && apt-get install -y --force-yes libssl-dev openssl build-essential zlib1g-dev && \
wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz && \
tar xzvf Python-${PYTHON_VERSION}.tgz && \
cd Python-${PYTHON_VERSION} && \
./configure && make && make install && \
ln -s ./python /usr/bin/python
# install and cache sbt, python
RUN echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list && \
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add && \
apt-get -qq update && \
apt-get install -y --force-yes python3-pip sbt=1.1.6
WORKDIR /usr/src/app/
# install other ci deps
COPY ci ci
RUN ci/install-python-dependencies.sh && \
ci/install-spark.sh
# add sbt and cache deps
COPY project project
COPY build.sbt .
RUN sbt update
# add the rest of the code
COPY . .
ENV SPARK_HOME /tmp/spark-2.4.4-bin-hadoop2.7
ENV JAVA_OPTIONS "-Xmx1500m -Dakka.test.timefactor=3"
CMD ["/usr/src/app/run_tests.sh"]