-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
60 lines (48 loc) · 1.6 KB
/
dockerfile
File metadata and controls
60 lines (48 loc) · 1.6 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
55
56
57
58
59
60
FROM node:22.9-alpine
VOLUME /data
# install cloc - counts lines of code
RUN apk add --no-cache cloc
RUN apk add --no-cache git
# trust repositories not owned by the current user https://github.blog/2022-04-18-highlights-from-git-2-36/#stricter-repository-ownership-checks
RUN git config --global --add safe.directory '*'
RUN apk add --no-cache python3
RUN apk add --no-cache curl
RUN apk add --no-cache bash
RUN apk add --no-cache openjdk11
RUN apk add --no-cache jq
# install clojure
RUN curl -O https://download.clojure.org/install/linux-install-1.10.3.822.sh
RUN chmod +x linux-install-1.10.3.822.sh
RUN ./linux-install-1.10.3.822.sh
# install Leiningen (Clojure compiler)
RUN curl -O https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
RUN chmod a+x lein
RUN mv ./lein /usr/bin
RUN lein
# create main dest folder
ARG dest=/usr/src/code-analysys
RUN mkdir -p $dest
# install maat-scripts
WORKDIR $dest
RUN git clone -b python3 https://github.com/adamtornhill/maat-scripts.git maat-scripts
# install code-maat
RUN git clone https://github.com/adamtornhill/code-maat.git code-maat
WORKDIR $dest/code-maat
RUN lein deps
RUN mv "$(lein uberjar | sed -n 's/^Created \(.*standalone\.jar\)/\1/p')" app-standalone.jar
# install git-miner
WORKDIR $dest
RUN git clone https://github.com/riccardomerlin/git-miner.git git-miner
WORKDIR $dest/git-miner
RUN npm ci
RUN npm install -g
WORKDIR $dest
# copy commands
COPY index.html .
COPY analysis-index.html .
COPY hotspots.html .
COPY complexity-file-trend.html .
COPY code-analysis.sh .
COPY server.js .
COPY analyses.json .
ENTRYPOINT ["bash", "code-analysis.sh"]