Skip to content

Commit

Permalink
SONAR-21432 Update the SonarQube group ID to root and related folder …
Browse files Browse the repository at this point in the history
…permissions
  • Loading branch information
carminevassallo authored Jan 22, 2024
1 parent b2727c9 commit 8e556d6
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 20 deletions.
7 changes: 3 additions & 4 deletions 10/community/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ ENV DOCKER_RUNNING="true" \
SQ_TEMP_DIR="/opt/sonarqube/temp"

RUN set -eux; \
groupadd --system --gid 1000 sonarqube; \
useradd --system --uid 1000 --gid sonarqube sonarqube; \
useradd --system --uid 1000 --gid 0 sonarqube; \
apt-get update; \
apt-get --no-install-recommends -y install gnupg unzip curl bash fonts-dejavu; \
echo "networkaddress.cache.ttl=5" >> "${JAVA_HOME}/conf/security/java.security"; \
Expand All @@ -45,8 +44,8 @@ RUN set -eux; \
rm sonarqube.zip*; \
rm -rf ${SONARQUBE_HOME}/bin/*; \
ln -s "${SONARQUBE_HOME}/lib/sonar-application-${SONARQUBE_VERSION}.jar" "${SONARQUBE_HOME}/lib/sonarqube.jar"; \
chmod -R 555 ${SONARQUBE_HOME}; \
chmod -R ugo+wrX "${SQ_DATA_DIR}" "${SQ_EXTENSIONS_DIR}" "${SQ_LOGS_DIR}" "${SQ_TEMP_DIR}"; \
chmod -R 550 ${SONARQUBE_HOME}; \
chmod -R 770 "${SQ_DATA_DIR}" "${SQ_EXTENSIONS_DIR}" "${SQ_LOGS_DIR}" "${SQ_TEMP_DIR}"; \
apt-get remove -y gnupg unzip; \
rm -rf /var/lib/apt/lists/*;

Expand Down
7 changes: 3 additions & 4 deletions 10/datacenter/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ ENV DOCKER_RUNNING="true" \
SONAR_CLUSTER_ENABLED="true"

RUN set -eux; \
groupadd --system --gid 1000 sonarqube; \
useradd --system --uid 1000 --gid sonarqube sonarqube; \
useradd --system --uid 1000 --gid 0 sonarqube; \
apt-get update; \
apt-get --no-install-recommends -y install gnupg unzip curl bash fonts-dejavu iproute2; \
echo "networkaddress.cache.ttl=5" >> "${JAVA_HOME}/conf/security/java.security"; \
Expand All @@ -47,8 +46,8 @@ RUN set -eux; \
rm sonarqube.zip*; \
rm -rf ${SONARQUBE_HOME}/bin/*; \
ln -s "${SONARQUBE_HOME}/lib/sonar-application-${SONARQUBE_VERSION}.jar" "${SONARQUBE_HOME}/lib/sonarqube.jar"; \
chmod -R 555 ${SONARQUBE_HOME}; \
chmod -R ugo+wrX "${SQ_DATA_DIR}" "${SQ_EXTENSIONS_DIR}" "${SQ_LOGS_DIR}" "${SQ_TEMP_DIR}"; \
chmod -R 550 ${SONARQUBE_HOME}; \
chmod -R 770 "${SQ_DATA_DIR}" "${SQ_EXTENSIONS_DIR}" "${SQ_LOGS_DIR}" "${SQ_TEMP_DIR}"; \
apt-get remove -y gnupg unzip; \
rm -rf /var/lib/apt/lists/*;

Expand Down
7 changes: 3 additions & 4 deletions 10/datacenter/search/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ ENV DOCKER_RUNNING="true" \
SONAR_CLUSTER_ENABLED="true"

RUN set -eux; \
groupadd --system --gid 1000 sonarqube; \
useradd --system --uid 1000 --gid sonarqube sonarqube; \
useradd --system --uid 1000 --gid 0 sonarqube; \
apt-get update; \
apt-get --no-install-recommends -y install gnupg unzip curl bash fonts-dejavu iproute2; \
echo "networkaddress.cache.ttl=5" >> "${JAVA_HOME}/conf/security/java.security"; \
Expand All @@ -47,8 +46,8 @@ RUN set -eux; \
rm sonarqube.zip*; \
rm -rf ${SONARQUBE_HOME}/bin/*; \
ln -s "${SONARQUBE_HOME}/lib/sonar-application-${SONARQUBE_VERSION}.jar" "${SONARQUBE_HOME}/lib/sonarqube.jar"; \
chmod -R 555 ${SONARQUBE_HOME}; \
chmod -R ugo+wrX "${SQ_DATA_DIR}" "${SQ_EXTENSIONS_DIR}" "${SQ_LOGS_DIR}" "${SQ_TEMP_DIR}"; \
chmod -R 550 ${SONARQUBE_HOME}; \
chmod -R 770 "${SQ_DATA_DIR}" "${SQ_EXTENSIONS_DIR}" "${SQ_LOGS_DIR}" "${SQ_TEMP_DIR}"; \
apt-get remove -y gnupg unzip curl; \
rm -rf /var/lib/apt/lists/*;

Expand Down
7 changes: 3 additions & 4 deletions 10/developer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ ENV DOCKER_RUNNING="true" \
SQ_TEMP_DIR="/opt/sonarqube/temp"

RUN set -eux; \
groupadd --system --gid 1000 sonarqube; \
useradd --system --uid 1000 --gid sonarqube sonarqube; \
useradd --system --uid 1000 --gid 0 sonarqube; \
apt-get update; \
apt-get --no-install-recommends -y install gnupg unzip curl bash fonts-dejavu; \
echo "networkaddress.cache.ttl=5" >> "${JAVA_HOME}/conf/security/java.security"; \
Expand All @@ -45,8 +44,8 @@ RUN set -eux; \
rm sonarqube.zip*; \
rm -rf ${SONARQUBE_HOME}/bin/*; \
ln -s "${SONARQUBE_HOME}/lib/sonar-application-${SONARQUBE_VERSION}.jar" "${SONARQUBE_HOME}/lib/sonarqube.jar"; \
chmod -R 555 ${SONARQUBE_HOME}; \
chmod -R ugo+wrX "${SQ_DATA_DIR}" "${SQ_EXTENSIONS_DIR}" "${SQ_LOGS_DIR}" "${SQ_TEMP_DIR}"; \
chmod -R 550 ${SONARQUBE_HOME}; \
chmod -R 770 "${SQ_DATA_DIR}" "${SQ_EXTENSIONS_DIR}" "${SQ_LOGS_DIR}" "${SQ_TEMP_DIR}"; \
apt-get remove -y gnupg unzip; \
rm -rf /var/lib/apt/lists/*;

Expand Down
7 changes: 3 additions & 4 deletions 10/enterprise/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ ENV DOCKER_RUNNING="true" \
SQ_TEMP_DIR="/opt/sonarqube/temp"

RUN set -eux; \
groupadd --system --gid 1000 sonarqube; \
useradd --system --uid 1000 --gid sonarqube sonarqube; \
useradd --system --uid 1000 --gid 0 sonarqube; \
apt-get update; \
apt-get --no-install-recommends -y install gnupg unzip curl bash fonts-dejavu; \
echo "networkaddress.cache.ttl=5" >> "${JAVA_HOME}/conf/security/java.security"; \
Expand All @@ -45,8 +44,8 @@ RUN set -eux; \
rm sonarqube.zip*; \
rm -rf ${SONARQUBE_HOME}/bin/*; \
ln -s "${SONARQUBE_HOME}/lib/sonar-application-${SONARQUBE_VERSION}.jar" "${SONARQUBE_HOME}/lib/sonarqube.jar"; \
chmod -R 555 ${SONARQUBE_HOME}; \
chmod -R ugo+wrX "${SQ_DATA_DIR}" "${SQ_EXTENSIONS_DIR}" "${SQ_LOGS_DIR}" "${SQ_TEMP_DIR}"; \
chmod -R 550 ${SONARQUBE_HOME}; \
chmod -R 770 "${SQ_DATA_DIR}" "${SQ_EXTENSIONS_DIR}" "${SQ_LOGS_DIR}" "${SQ_TEMP_DIR}"; \
apt-get remove -y gnupg unzip; \
rm -rf /var/lib/apt/lists/*;

Expand Down

0 comments on commit 8e556d6

Please sign in to comment.