-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathDockerfile
35 lines (24 loc) · 1.06 KB
/
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
FROM openjdk:8u171
# Mount host directory containing repositories to analyze here
VOLUME /repos
# Mount host output directory here
VOLUME /var/opt/codeshovel/output
# Last commit to start running the analysis from
ENV START_COMMIT ${START_COMMIT}
# The name of the repository directory in the /repos directory
ENV REPO_NAME ${REPO_NAME}
# The file extension to search for. Defaults to .java
ENV FILE_EXT ${FILE_EXT:-.java}
# A space-separated list of relative (from REPO_NAME) paths to search files with FILE_EXT. Defaults to all subdirectories
ENV SEARCH_PATHS ${SEARCH_PATHS:-.}
ENV OUTPUT_DIR /var/opt/codeshovel/output
ENV WRITE_RESULTS true
ENV WRITE_GITLOG false
ENV WRITE_SEMANTIC_DIFFS false
RUN apt-get update && apt-get -y install maven
WORKDIR /opt/codeshovel
COPY ./ ./
RUN mvn verify
CMD cd "/repos/${REPO_NAME}" && \
find ${SEARCH_PATHS} -type f -name "*${FILE_EXT}" \
-exec bash -c 'timeout 15m java -classpath "/opt/codeshovel/target/*" com.felixgrund.codeshovel.execution.DockerExecution ${1#./} ${START_COMMIT} || echo ^^^[$?]${1#./}' - {} \;