forked from Eagle-OJ/eagle-oj-judger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (35 loc) · 1010 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
28
29
30
31
32
33
34
35
36
37
38
FROM ubuntu:16.04
RUN apt update && \
apt install -y python && \
apt install -y python3 && \
apt install -y openjdk-8-jre && \
apt install -y openjdk-8-jdk && \
apt install -y cmake && \
apt install -y gcc && \
apt install -y g++ && \
apt install -y python3-pip && \
apt install -y libseccomp-dev && \
apt install -y git && \
pip3 install --no-cache-dir flask gunicorn gevent virtualenv psutil && \
cd /usr && \
git clone https://github.com/Eagle-OJ/eagle-oj-judger.git --depth=1 && \
cd eagle-oj-judger && \
mkdir build && \
cd build && \
cmake .. && \
make && \
make install && \
cd ../bindings/Python && \
python3 setup.py install && \
python3 /usr/eagle-oj-judger/Judger/server/initEnv.py && \
cd /usr && \
mkdir myenv && \
cd myenv && \
virtualenv --system-site-packages py3env && \
useradd -u 1001 compiler && \
apt clean && \
apt autoremove && \
rm -rf /var/lib/apt/lists/* && \
chmod +x /usr/eagle-oj-judger/run.sh
CMD ./usr/eagle-oj-judger/run.sh
EXPOSE 5000