-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" \ | ||
"$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters