-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (31 loc) · 1.28 KB
/
Dockerfile
File metadata and controls
39 lines (31 loc) · 1.28 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
# Standalone Docker image for CodeCureAgent.
# Replicates the devcontainer setup (.devcontainer/) with the project files baked in.
FROM mcr.microsoft.com/devcontainers/base:jammy
# Install system dependencies (matches .devcontainer/Dockerfile)
RUN apt-get update && apt-get install -y \
openjdk-11-jdk \
openjdk-17-jdk \
dos2unix \
bash-builtins \
maven=3.6.3-5 \
&& rm -rf /var/lib/apt/lists/*
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
# Install Python 3.10 with pip (matches devcontainer Python feature)
RUN apt-get update && apt-get install -y python3.10 python3.10-dev python3-pip \
&& rm -rf /var/lib/apt/lists/*
# Copy project files (see .dockerignore for exclusions, notably .git)
WORKDIR /workspace
RUN mkdir CodeCureAgent
WORKDIR /workspace/CodeCureAgent
COPY . .
# Upgrade pip to avoid a resolver bug present in the apt-installed version
RUN python3.10 -m pip install --upgrade pip
# Run setup equivalent to the devcontainer postCreateCommand:
# install Python deps and build the bundled Sorald jar
RUN cd code_cure_agent \
&& python3.10 -m pip install -r requirements.txt \
&& cd sorald \
&& mvn clean package -DskipTests \
&& cp sorald/target/sorald-*-jar-with-dependencies.jar sorald.jar
WORKDIR /workspace/CodeCureAgent
CMD ["/bin/bash"]