Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (33 loc) · 1.74 KB
/
Copy pathDockerfile
File metadata and controls
39 lines (33 loc) · 1.74 KB
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
FROM ubuntu:24.04
RUN apt-get -y update && apt-get upgrade -y
RUN apt-get -y install gcc valgrind
RUN apt-get -y install openjdk-21-jdk
RUN apt-get -y install gawk
RUN apt-get -y install git
RUN apt-get -y install iproute2
# Go toolchain for Go assignments (Ubuntu 24.04 ships Go 1.22)
# golang-go pulls in g++ (13), so install it before switching g++ to 14
RUN apt-get -y install golang-go
RUN apt-get -y install g++-14
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100
# The g++ package owns /usr/bin/g++ (-> g++-13), so update-alternatives can't replace it
RUN ln -sf /etc/alternatives/g++ /usr/bin/g++
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-14 100
# Install docker to test tofu
RUN apt-get -y install wget curl docker.io
RUN wget -qO- https://get.opentofu.org/install-opentofu.sh | sh -s -- --install-method deb
# Install maven 3.8.6 for compatibility with jdk 17
RUN wget https://archive.apache.org/dist/maven/maven-3/3.9.11/binaries/apache-maven-3.9.11-bin.tar.gz
RUN tar xzvf apache-maven-3.9.11-bin.tar.gz -C/opt/
ENV PATH="${PATH}:/opt/apache-maven-3.9.11/bin:/root/.local/bin"
RUN apt-get -y install sudo pipx
# Setuid wrapper that lets an unprivileged evaluation start dockerd (see the
# comment in start-dockerd.c). Only useful when the container is --privileged.
COPY start-dockerd.c /tmp/start-dockerd.c
RUN gcc -O2 -Wall -o /usr/local/bin/start-dockerd /tmp/start-dockerd.c \
&& chmod 4755 /usr/local/bin/start-dockerd && rm /tmp/start-dockerd.c
COPY . /codeval
WORKDIR /submissions
# Install outside /root so the evaluation can run as the host user (-u in the
# codeval.ini run command). /usr/local/bin is already on PATH.
RUN PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install /codeval --force