Skip to content

Commit

Permalink
Add SonarQube 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Godin committed Jan 11, 2016
1 parent 1cdb499 commit f131922
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
38 changes: 38 additions & 0 deletions 5.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM java:openjdk-8u45-jdk

MAINTAINER David Gageot <[email protected]>

ENV SONARQUBE_HOME /opt/sonarqube

# Http port
EXPOSE 9000

# Database configuration
# Defaults to using H2
ENV SONARQUBE_JDBC_USERNAME sonar
ENV SONARQUBE_JDBC_PASSWORD sonar
ENV SONARQUBE_JDBC_URL jdbc:h2:tcp://localhost:9092/sonar

ENV SONAR_VERSION 5.3

# pub 2048R/D26468DE 2015-05-25
# Key fingerprint = F118 2E81 C792 9289 21DB CAB4 CFCA 4A29 D264 68DE
# uid sonarsource_deployer (Sonarsource Deployer) <[email protected]>
# sub 2048R/06855C1D 2015-05-25
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys F1182E81C792928921DBCAB4CFCA4A29D26468DE

RUN set -x \
&& cd /opt \
&& curl -o sonarqube.zip -fSL https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-$SONAR_VERSION.zip \
&& curl -o sonarqube.zip.asc -fSL https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-$SONAR_VERSION.zip.asc \
&& gpg --verify sonarqube.zip.asc \
&& unzip sonarqube.zip \
&& mv sonarqube-$SONAR_VERSION sonarqube \
&& rm sonarqube.zip* \
&& rm -rf $SONARQUBE_HOME/bin/*

VOLUME ["$SONARQUBE_HOME/data", "$SONARQUBE_HOME/extensions"]

WORKDIR $SONARQUBE_HOME
COPY run.sh $SONARQUBE_HOME/bin/
ENTRYPOINT ["./bin/run.sh"]
14 changes: 14 additions & 0 deletions 5.3/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set -e

if [ "${1:0:1}" != '-' ]; then
exec "$@"
fi

exec java -jar lib/sonar-application-$SONAR_VERSION.jar \
-Dsonar.log.console=true \
-Dsonar.jdbc.username="$SONARQUBE_JDBC_USERNAME" \
-Dsonar.jdbc.password="$SONARQUBE_JDBC_PASSWORD" \
-Dsonar.jdbc.url="$SONARQUBE_JDBC_URL" \
-Dsonar.web.javaAdditionalOpts="-Djava.security.egd=file:/dev/./urandom" \
"$@"
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ set -euo pipefail
docker build -t sonarsource/sonar-4.5.6 4.5.6
docker build -t sonarsource/sonar-5.1.2 5.1.2
docker build -t sonarsource/sonar-5.2 5.2
docker build -t sonarsource/sonar-5.3 5.3

0 comments on commit f131922

Please sign in to comment.