forked from niko64fx/spark-stat-analyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (21 loc) · 977 Bytes
/
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
FROM gettyimages/spark:2.1.0-hadoop-2.7
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
libpq5 \
zip \
&& \
rm -rf /var/lib/apt/lists/*
COPY . /srv/spark-stat-analyzer
WORKDIR /srv/spark-stat-analyzer
RUN set -xe && \
buildDeps="libpq-dev python3-dev build-essential" && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install $buildDeps && \
pip3 install -r requirements.txt && \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $buildDeps && \
rm -rf /var/lib/apt/lists/*
RUN cp config.py.docker config.py && rm config.py.dist && rm config.py.docker
RUN zip -r spark-stat-analyzer.zip analyzers includes
RUN cp /usr/spark-2.1.0/conf/log4j.properties.template /usr/spark-2.1.0/conf/log4j.properties
RUN sed -i 's/INFO, console/WARN, console/g' /usr/spark-2.1.0/conf/log4j.properties
CMD ["bash"]