DOCKER-61 removed sks keyserver on SonarQube Dockerfiles to follow official library recommendations

This commit is contained in:
2022-03-19 18:24:15 +02:00
parent 2edef96f99
commit f0bc4632e6
12 changed files with 243 additions and 17 deletions

View File

@@ -7,7 +7,7 @@ ENV LANG='en_US.UTF-8' \
#
# SonarQube setup
#
ARG SONARQUBE_VERSION=9.2.4.50792
ARG SONARQUBE_VERSION=9.3.0.51899
ARG SONARQUBE_ZIP_URL=https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-${SONARQUBE_VERSION}.zip
ENV JAVA_HOME='/usr/lib/jvm/java-11-openjdk' \
PATH="/opt/java/openjdk/bin:$PATH" \
@@ -29,11 +29,8 @@ RUN set -eux; \
# sub 2048R/06855C1D 2015-05-25
echo "networkaddress.cache.ttl=5" >> "${JAVA_HOME}/conf/security/java.security"; \
sed --in-place --expression="s?securerandom.source=file:/dev/random?securerandom.source=file:/dev/urandom?g" "${JAVA_HOME}/conf/security/java.security"; \
for server in $(shuf -e ha.pool.sks-keyservers.net \
hkp://p80.pool.sks-keyservers.net:80 \
keyserver.ubuntu.com \
hkp://keyserver.ubuntu.com:80 \
pgp.mit.edu) ; do \
for server in $(shuf -e hkps://keys.openpgp.org \
hkps://keyserver.ubuntu.com) ; do \
gpg --batch --keyserver "${server}" --recv-keys 679F1EE92B19609DE816FDE81DB198F93525EC1A && break || : ; \
done; \
mkdir --parents /opt; \
@@ -58,4 +55,4 @@ EXPOSE 9000
STOPSIGNAL SIGINT
ENTRYPOINT ["/opt/sonarqube/bin/run.sh"]
CMD ["/opt/sonarqube/bin/sonar.sh"]
CMD ["/opt/sonarqube/bin/sonar.sh"]