forked from newtmitch/docker-sonar-scanner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.sonarscanner-3.2.0-full
30 lines (21 loc) · 1.04 KB
/
Dockerfile.sonarscanner-3.2.0-full
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
FROM openjdk:8
LABEL maintainer="Ryan Mitchell <mitch@ryansmitchell.com>"
RUN apt-get update
RUN apt-get install -y curl git tmux htop maven sudo
# Install Node - allows for scanning of Typescript
RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
RUN sudo apt-get install -y nodejs build-essential
# Set timezone to CST
ENV TZ=America/Chicago
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
WORKDIR /root
RUN curl --insecure -o ./sonarscanner.zip -L https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-3.2.0.1227-linux.zip
RUN unzip sonarscanner.zip
RUN rm sonarscanner.zip
RUN mv sonar-scanner-3.2.0.1227-linux sonar-scanner
ENV SONAR_RUNNER_HOME=/root/sonar-scanner
ENV PATH $PATH:/root/sonar-scanner/bin
COPY sonar-runner.properties ./sonar-scanner/conf/sonar-scanner.properties
# Use bash if you want to run the environment from inside the shell, otherwise use the command that actually runs the underlying stuff
#CMD /bin/bash
CMD sonar-scanner -Dsonar.projectBaseDir=./src