|
1 | 1 | # Basic problemtools docker image, containing problemtools and the |
2 | 2 | # "ICPC languages" (C, C++, Java, Kotlin, and Python 3) |
3 | 3 | # |
| 4 | +# Build requirements: |
| 5 | +# - The problemtools .deb package must be available from the host file |
| 6 | +# system under a file name matching |
| 7 | +# artifacts/deb/kattis-problemtools*.deb |
| 8 | +# (Version of that .deb file should match the build argument |
| 9 | +# PROBLEMTOOLS_VERSION but this is not checked.) |
4 | 10 |
|
5 | 11 | ARG PROBLEMTOOLS_VERSION=develop |
6 | | -FROM problemtools/minimal:${PROBLEMTOOLS_VERSION} |
7 | | - |
8 | | -LABEL maintainer="austrin@kattis.com" |
| 12 | +FROM problemtools/icpclangs:${PROBLEMTOOLS_VERSION} |
9 | 13 |
|
| 14 | +LABEL maintainer="contact@kattis.com" |
10 | 15 | ENV DEBIAN_FRONTEND=noninteractive |
11 | 16 |
|
12 | | -# Install C++, Java, and PyPy 3 via their ppa repository (Kotlin is installed below to get a more up-to-date version) |
13 | | -RUN apt-get update && \ |
14 | | - apt-get install -y software-properties-common && \ |
15 | | - add-apt-repository ppa:pypy/ppa && \ |
16 | | - apt-get update && \ |
17 | | - apt-get install -y \ |
18 | | - gcc g++ \ |
19 | | - openjdk-11-jdk openjdk-11-jre \ |
20 | | - pypy3 |
21 | | - |
22 | | -RUN apt-get install -y curl |
23 | | - |
24 | | -ARG KOTLIN_VERSION=1.8.10 |
25 | | -RUN curl "https://github.com/JetBrains/kotlin/releases/download/v$KOTLIN_VERSION/kotlin-compiler-$KOTLIN_VERSION.zip" -L -o kotlin.zip |
26 | | -RUN unzip -q kotlin.zip |
27 | | -RUN rm kotlin.zip |
28 | | - |
29 | | -RUN mv kotlinc/bin/* /usr/bin |
30 | | -RUN mv kotlinc/lib/* /usr/lib |
31 | | - |
32 | | -RUN rm -r kotlinc |
33 | | - |
34 | | -# Reconfigure problemtools: |
35 | | -# - Use PyPy for Python 2 (not available in this image but in the full one) |
36 | | -# - Use PyPy for Python 3 |
37 | | -RUN mkdir -p /etc/kattis/problemtools |
38 | | -RUN echo " \n\ |
39 | | -python2: \n\ |
40 | | - name: 'Python 2 w/PyPy'\n\ |
41 | | - run: '/usr/bin/pypy \"{mainfile}\"'\n\ |
42 | | - \n\ |
43 | | -python3: \n\ |
44 | | - name: 'Python 3 w/PyPy'\n\ |
45 | | - run: '/usr/bin/pypy3 \"{mainfile}\"'\n\ |
46 | | - \n" > /etc/kattis/problemtools/languages.yaml |
| 17 | +RUN mkdir -p /usr/local/artifacts |
| 18 | +WORKDIR /usr/local/artifacts |
| 19 | +COPY artifacts/deb . |
| 20 | +RUN dpkg -i kattis-problemtools*.deb |
47 | 21 |
|
48 | 22 | WORKDIR / |
0 commit comments