forked from dodona-edu/docker-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dodona-tested.dockerfile
45 lines (42 loc) · 1.75 KB
/
dodona-tested.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
FROM python:3.9.1-slim-buster
# Environment Kotlin
ENV SDKMAN_DIR /usr/local/sdkman
ENV PATH $SDKMAN_DIR/candidates/kotlin/current/bin:$PATH
# Add manual directory for default-jdk
RUN mkdir -p /usr/share/man/man1mkdir -p /usr/share/man/man1 \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
# TESTed Java and Kotlin judge dependency
openjdk-11-jdk=11.0.9.1+1-1~deb10u2 \
# TESTed Haskell judge dependency
haskell-platform=2014.2.0.0.debian8 \
# TESTed C judge dependency
gcc-8=8.3.0-6 \
# TESTed Javascript judge dependency
nodejs=10.24.0~dfsg-1~deb10u1 \
# Additional dependencies
dos2unix=7.4.0-1 \
curl=7.64.0-4+deb10u1 \
zip=3.0-11+b1 \
unzip=6.0-23+deb10u2 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
# TESTed Judge depencencies
&& pip install jsonschema==3.2.0 psutil==5.7.0 mako==1.1.2 pydantic==1.7.3 toml==0.10.1 typing_inspect==0.6.0 pylint==2.6.0 esprima==4.0.1 lark==0.10.1 pyyaml==5.3.1 Pygments==2.7.4 python-i18n==0.3.9 \
# TESTed Kotlin judge dependencies
&& bash -c 'set -o pipefail && curl -s "https://get.sdkman.io?rcupdate=false" | bash' \
&& chmod a+x "$SDKMAN_DIR/bin/sdkman-init.sh" \
&& bash -c "source \"$SDKMAN_DIR/bin/sdkman-init.sh\" && sdk install kotlin 1.4.10" \
# Haskell dependencies
&& cabal update \
&& cabal install aeson --global --force-reinstalls \
# Make sure the students can't find our secret path, which is mounted in
# /mnt with a secure random name.
&& chmod 711 /mnt \
# Add the user which will run the student's code and the judge.
&& useradd -m runner \
&& mkdir /home/runner/workdir \
&& chown -R runner:runner /home/runner/workdir
USER runner
WORKDIR /home/runner/workdir
COPY main.sh /main.sh