-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (43 loc) · 1.57 KB
/
Dockerfile
File metadata and controls
54 lines (43 loc) · 1.57 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
RUN apt-get update && apt-get install -y \
curl \
wget \
git \
unzip \
software-properties-common \
&& rm -rf /var/lib/apt/lists/*
# Install yq for YAML parsing
RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 \
&& chmod +x /usr/local/bin/yq
# install Python 3.12
RUN add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y python3.12 python3.12-venv python3.12-dev python3-pip && \
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 && \
update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1 && \
rm -rf /var/lib/apt/lists/*
# install Java JDK 17
RUN apt-get update && \
apt-get install -y openjdk-17-jdk && \
rm -rf /var/lib/apt/lists/*
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
ENV PATH=$JAVA_HOME/bin:$PATH
# install Maven 3.9.6
RUN wget https://archive.apache.org/dist/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz && \
tar -xzf apache-maven-3.9.6-bin.tar.gz && \
mv apache-maven-3.9.6 /opt/maven && \
rm apache-maven-3.9.6-bin.tar.gz
ENV MAVEN_HOME=/opt/maven
ENV PATH=$MAVEN_HOME/bin:$PATH
# install uv
RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
export PATH="/root/.local/bin:$PATH" && \
/root/.local/bin/uv --version
ENV PATH=/root/.local/bin:$PATH
WORKDIR /sec-code-bench
COPY . /sec-code-bench/
# install project dependencies
RUN /root/.local/bin/uv sync
CMD ["/bin/bash"]