forked from mc1arke/sonarqube-community-branch-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.Dockerfile
More file actions
25 lines (20 loc) · 1.08 KB
/
release.Dockerfile
File metadata and controls
25 lines (20 loc) · 1.08 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
ARG SONARQUBE_VERSION="community"
FROM sonarqube:${SONARQUBE_VERSION}
ARG PLUGIN_VERSION
ARG DOWNLOAD_BASE_URL=https://github.com/mc1arke/sonarqube-community-branch-plugin/releases/download/${PLUGIN_VERSION}
ENV PLUGIN_VERSION=${PLUGIN_VERSION}
ADD --chown=sonarqube:root ${DOWNLOAD_BASE_URL}/sonarqube-community-branch-plugin-${PLUGIN_VERSION}.jar /opt/sonarqube/extensions/plugins/
USER root
RUN apt-get update && \
apt-get --no-install-recommends -y install unzip && \
wget ${DOWNLOAD_BASE_URL}/sonarqube-webapp.zip && \
rm -rf /opt/sonarqube/web/* && \
unzip sonarqube-webapp.zip -d /opt/sonarqube/web && \
chown -R sonarqube:root /opt/sonarqube/web && \
chmod -R 550 /opt/sonarqube/web && \
apt-get remove -y unzip && \
rm sonarqube-webapp.zip && \
apt-get clean
USER sonarqube
ENV SONAR_WEB_JAVAADDITIONALOPTS="-javaagent:/opt/sonarqube/extensions/plugins/sonarqube-community-branch-plugin-${PLUGIN_VERSION}.jar=web"
ENV SONAR_CE_JAVAADDITIONALOPTS="-javaagent:/opt/sonarqube/extensions/plugins/sonarqube-community-branch-plugin-${PLUGIN_VERSION}.jar=ce"