-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
63 lines (54 loc) · 1.76 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
FROM devosoft/empirical
USER root
COPY . /opt/empirical-joss-demo
RUN \
apt-get install -qq \
python-virtualenv \
python3-virtualenv \
python-pip \
python3-pip \
doxygen \
&& \
echo "installed docs dependencies"
RUN \
pip3 install -r /opt/empirical-joss-demo/docs/requirements.txt \
&& \
echo "installed documentation build requirements"
RUN \
add-apt-repository -y ppa:ubuntu-toolchain-r/test \
&& \
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
&& \
apt-add-repository "deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" \
&& \
apt-get update -qq \
&& \
apt-get install -y cmake build-essential python-virtualenv python-pip nodejs tar gzip libclang-7-dev llvm-7 clang-7 libstdc++-7-dev gdb \
&& \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-7 90 \
&& \
update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-7 90 \
&& \
update-alternatives --install /usr/bin/llvm-profdata llvm-profdata /usr/bin/llvm-profdata-7 90 \
&& \
update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-7 90 \
&& \
echo "installed force cover build dependencies"
# make sure unprivileged user has access to new files in opt
# adapted from https://stackoverflow.com/a/27703359
# and https://superuser.com/a/235398
RUN \
chgrp --recursive user /opt/empirical-joss-demo \
&& \
chmod --recursive g+rwx /opt/empirical-joss-demo \
&& \
echo "user granted permissions to /opt/empirical-joss-demo"
USER user
RUN \
cd /opt/empirical-joss-demo \
&& \
make install-test-dependencies \
&& \
echo "installed test dependencies"
# Define default working directory.
WORKDIR /opt/empirical-joss-demo