Skip to content

Commit

Permalink
SONAR-22089 Remove Python from installed libraries
Browse files Browse the repository at this point in the history
 - Fix cacerts location
  • Loading branch information
csaba-feher-sonarsource committed Apr 15, 2024
1 parent 11e6606 commit c7cc852
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN set -eux; \
addgroup -S -g 1000 scanner-cli; \
adduser -S -D -u 1000 -G scanner-cli scanner-cli; \
apk add --no-cache --virtual build-dependencies wget unzip gnupg; \
apk add --no-cache git python3 py3-pip py3-pylint bash shellcheck "nodejs>=18" openjdk17-jre curl musl-locales musl-locales-lang; \
apk add --no-cache git bash shellcheck "nodejs>=18" openjdk17-jre musl-locales musl-locales-lang; \
wget -U "scannercli" -q -O /opt/sonar-scanner-cli.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}.zip; \
wget -U "scannercli" -q -O /opt/sonar-scanner-cli.zip.asc https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}.zip.asc; \
for server in $(shuf -e hkps://keys.openpgp.org \
Expand Down
4 changes: 2 additions & 2 deletions 5/bin/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ add_env_var_as_env_prop() {
fi
}

# If there are certificates in /tmp/cacers we will import those into the systems truststore
# If there are certificates in /tmp/cacerts we will import those into the systems truststore
if [[ -d /tmp/cacerts ]]; then
# shellcheck disable=SC2312
if [[ -n "$(ls -A /tmp/cacerts 2>/dev/null)" ]]; then
for f in /tmp/cacerts/*
do
keytool -importcert -file "${f}" -alias "$(basename "${f}")" -keystore /opt/java/openjdk/lib/security/cacerts -storepass changeit -trustcacerts -noprompt
keytool -importcert -file "${f}" -alias "$(basename "${f}")" -keystore /usr/lib/jvm/default-jvm/jre/lib/security/cacerts -storepass changeit -trustcacerts -noprompt
done
fi
fi
Expand Down

0 comments on commit c7cc852

Please sign in to comment.