forked from stg-tud/MUBench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
95 lines (86 loc) · 2.29 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
FROM openjdk:8-jdk-alpine
MAINTAINER Sven Amann <[email protected]>
# Install ca-certificates so that HTTPS works consistently
RUN apk update \
&& apk add ca-certificates wget \
&& update-ca-certificates
ENV LANG=C.UTF-8 \
GRADLE_VERSION=4.0.2 \
GRADLE_HOME=/usr/local/gradle
ENV PATH=${PATH}:${GRADLE_HOME}/bin
# Setup pipeline environment
RUN apk update \
\
# Install Python
&& apk add \
py3-psutil \
python3 \
yaml-dev \
&& ln -s /usr/bin/python3 /usr/bin/python \
&& ln -s /usr/bin/pip3 /usr/bin/pip \
&& pip install --upgrade pip \
\
# Install runtime dependencies
&& apk add \
apache-ant \
git \
graphviz \
maven \
subversion \
bash \
\
# Install gradle
&& wget -q https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip \
&& unzip -q gradle-$GRADLE_VERSION-bin.zip -d /usr/local \
&& rm -f gradle-$GRADLE_VERSION-bin.zip \
&& ln -s /usr/local/gradle-$GRADLE_VERSION /usr/local/gradle
# Setup reviewsite environment
RUN apk update \
\
# Install PHP
&& apk add \
php7 \
php7-ctype \
php7-curl \
php7-dom \
php7-json \
php7-mbstring \
php7-openssl \
php7-pdo \
php7-pdo_sqlite \
php7-phar \
php7-session \
php7-sqlite3 \
php7-tokenizer \
php7-xml \
php7-xmlwriter \
php7-zlib \
\
# Install Composer
&& wget -q https://getcomposer.org/installer -O composer-setup.php \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
&& rm composer-setup.php
# Install MUBench and configure interactive shell
WORKDIR /mubench
COPY . .
ARG mubench_version=v???
ENV PATH=/mubench/mubench.bin:${PATH}
CMD ["bash"]
RUN \
ln -s /mubench/mubench.bin/bashrc /root/.bashrc \
&& echo $mubench_version > VERSION \
# Setup pipeline
&& pip install -r /mubench/mubench.pipeline/requirements.txt \
\
# Setup reviewsite
&& composer install -d mubench.reviewsite --no-interaction --no-dev \
&& mkdir -p mubench.reviewsite/upload \
&& mkdir -p mubench.reviewsite/logs \
\
# Setup reviewsite standalone configuration
&& mkdir findings \
&& touch findings/reviews.sqlite \
&& mv mubench.reviewsite/settings.docker.php mubench.reviewsite/settings.php
# Provide standalone reviewsite
EXPOSE 80
STOPSIGNAL SIGTERM