-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (40 loc) · 2.02 KB
/
Dockerfile
File metadata and controls
54 lines (40 loc) · 2.02 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 sapmachine:21.0.9-jre-ubuntu
ARG USER_ADD
ARG USER_ID=1000
ARG USER_GID=$USER_ID
ARG USERNAME=ubuntu
COPY ./build/distributions/codecharta-analysis-*.tar /usr/local/
COPY ./script/simplecc.sh /usr/local/bin/
WORKDIR /usr/local
RUN tar -xf codecharta-analysis-*; \
rm codecharta-analysis-*.tar; \
mv codecharta-analysis-*/bin/ccsh /usr/local/bin; \
mv codecharta-analysis-*/lib/ccsh-*.jar /usr/local/lib; \
rm -rf codecharta-analysis-*;
RUN apt-get update && apt-get dist-upgrade -y
RUN apt-get install git -y
RUN apt-get install wget curl -y; \
wget -qO tokei.tar.gz https://github.com/XAMPPRocky/tokei/releases/download/v12.1.2/tokei-x86_64-unknown-linux-gnu.tar.gz; \
tar -xf tokei.tar.gz -C /usr/local/bin; \
rm tokei.tar.gz;
RUN wget -qO codemaat.jar https://github.com/adamtornhill/code-maat/releases/download/v1.0.2/code-maat-1.0.2-standalone.jar; \
mkdir --parents /opt/codemaat; \
mv codemaat.jar /opt/codemaat/;
RUN curl -sL https://deb.nodesource.com/setup_20.x -o /tmp/nodesource_setup.sh; \
bash /tmp/nodesource_setup.sh; \
apt-get install nodejs make gcc build-essential -y;
RUN curl -L https://github.com/thoughtbot/complexity/releases/download/0.4.2/complexity-0.4.2-x86_64-unknown-linux-musl.tar.gz \
| tar -xz --strip-components=1 -C /usr/local/bin
RUN wget -qO /tmp/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.1.0.4477-linux-x64.zip; \
apt-get install unzip -y; \
cd /tmp ; unzip sonar-scanner.zip; cd sonar-scanner-*-linux-x64; \
cp ./bin/sonar-scanner /usr/local/bin/; \
cp ./lib/sonar-scanner-cli-*.jar /usr/local/lib/; \
mkdir --parents /usr/local/conf ; cp ./conf/sonar-scanner.properties /usr/local/conf/; \
cp -r ./jre/ /usr/local/jre; cd /; rm /tmp/sonar-scanner.zip; rm -rf /tmp/sonar-scanner-*-linux-x64;
RUN if [ -n "$USER_ADD" ]; then \
groupadd --gid "$USER_GID" "$USERNAME" \
&& useradd --uid "$USER_ID" --gid "$USER_GID" -m "$USERNAME"; \
fi
USER $USERNAME
CMD ["ccsh"]