forked from DMOJ/judge-server
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
124 lines (107 loc) · 3.77 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
FROM debian:buster-slim
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
GOROOT=/usr/local/go \
GOPATH=/root/go \
PATH=$GOPATH/bin:$GOROOT/bin:/usr/local/cargo/bin:/root/.cabal/bin:/root/.local/bin:/opt/cabal/3.2/bin:/opt/ghc/8.10.2/bin:$PATH
RUN mkdir -p /usr/share/man/man1mkdir -p /usr/share/man/man1 && \
apt-get update -y && \
apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
gnupg2 \
file \
wget \
curl \
apt-transport-https \
software-properties-common \
dirmngr
RUN curl https://dmoj.ca/dmoj-apt.key | apt-key add - && \
add-apt-repository 'deb https://apt.dmoj.ca/ buster main' && \
curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | apt-key add - && \
add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ && \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 427CB69AAC9D00F2A43CAF1CBA3CBA3FFE22B574 && \
gpg --batch --armor --export 427CB69AAC9D00F2A43CAF1CBA3CBA3FFE22B574 > /etc/apt/trusted.gpg.d/haskell.org.gpg.asc && \
gpgconf --kill all && \
echo 'deb http://downloads.haskell.org/debian buster main' > /etc/apt/sources.list.d/ghc.list
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
gcc \
g++ \
ghc-8.10.4 \
cabal-install-3.2 \
xz-utils \
bzip2 \
libncurses5 \
libssl-dev \
libc6-dev \
libseccomp-dev \
libexpat1 \
libffi6 \
libsqlite3-0 \
python \
python-dev \
python-pip \
python-setuptools \
python3 \
python3-dev \
python3-pip \
python3-setuptools \
ruby \
mono-complete \
openjdk-11-jre \
openjdk-11-jdk \
adoptopenjdk-8-hotspot \
adoptopenjdk-11-hotspot \
adoptopenjdk-15-hotspot \
gfortran \
dart \
php-common \
php-cli \
swi-prolog \
racket \
sbcl \
nasm \
v8dmoj \
bash \
git \
unzip \
zip \
nano \
vim
RUN cabal update && cabal install vector
RUN wget -q -O rustup.sh "https://sh.rustup.rs" && \
chmod +x rustup.sh && \
./rustup.sh -y --no-modify-path --default-toolchain 1.47.0 && \
rm rustup.sh && \
chmod -R a+w $RUSTUP_HOME $CARGO_HOME
RUN wget -q -O go.tar.gz "https://dl.google.com/go/go1.15.8.linux-amd64.tar.gz" && \
tar -xzf go.tar.gz -C /usr/local && \
rm go.tar.gz
RUN wget -q -O pypy.tar.bz2 "https://github.com/squeaky-pl/portable-pypy/releases/download/pypy-7.2.0/pypy-7.2.0-linux_x86_64-portable.tar.bz2" && \
tar -xjf pypy.tar.bz2 -C /usr/local && \
mv /usr/local/pypy-7.2.0-linux_x86_64-portable /usr/local/pypy && \
rm pypy.tar.bz2
RUN wget -q -O pypy3.tar.bz2 "https://github.com/squeaky-pl/portable-pypy/releases/download/pypy3.6-7.2.0/pypy3.6-7.2.0-linux_x86_64-portable.tar.bz2" && \
tar -xjf pypy3.tar.bz2 -C /usr/local && \
mv /usr/local/pypy3.6-7.2.0-linux_x86_64-portable /usr/local/pypy3 && \
rm pypy3.tar.bz2
RUN wget -q -O kotlin.zip "https://github.com/JetBrains/kotlin/releases/download/v1.4.30/kotlin-compiler-1.4.30.zip" && \
unzip kotlin.zip -d /usr/local && \
rm kotlin.zip
RUN mkdir -p /problems && mkdir -p /rust && mkdir -p /judge
COPY rust /rust
WORKDIR /rust
RUN cargo build
WORKDIR /judge
RUN pip3 install --upgrade pip setuptools wheel
COPY requirements.txt /judge/requirements.txt
RUN pip3 install -r requirements.txt
COPY . /judge
RUN env DMOJ_REDIST=1 python3 setup.py develop && rm -rf build/ && \
rm -rf /rust && \
rm -rf ~/.cache && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*