diff --git a/10/community/Dockerfile b/10/community/Dockerfile index 25d2e859..cd8dac84 100644 --- a/10/community/Dockerfile +++ b/10/community/Dockerfile @@ -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"; \ @@ -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/*; diff --git a/10/datacenter/app/Dockerfile b/10/datacenter/app/Dockerfile index d80564f7..320b3c20 100644 --- a/10/datacenter/app/Dockerfile +++ b/10/datacenter/app/Dockerfile @@ -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"; \ @@ -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/*; diff --git a/10/datacenter/search/Dockerfile b/10/datacenter/search/Dockerfile index c7dfab06..a84cf780 100644 --- a/10/datacenter/search/Dockerfile +++ b/10/datacenter/search/Dockerfile @@ -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"; \ @@ -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/*; diff --git a/10/developer/Dockerfile b/10/developer/Dockerfile index 54a13526..c686a528 100644 --- a/10/developer/Dockerfile +++ b/10/developer/Dockerfile @@ -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"; \ @@ -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/*; diff --git a/10/enterprise/Dockerfile b/10/enterprise/Dockerfile index f85352a4..98314655 100644 --- a/10/enterprise/Dockerfile +++ b/10/enterprise/Dockerfile @@ -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"; \ @@ -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/*;