sonar-scanner-cli-docker icon indicating copy to clipboard operation
sonar-scanner-cli-docker copied to clipboard

Permission error when runing as non-root user with self-signed certificates

Open emzet opened this issue 3 years ago • 0 comments

There is a guide how to run container as a non-root user also with warning regarding file permisions.

But when running docker container as non-root user with custom self-signed certificates:

docker run \
  --rm \
  --user="$(id -u):$(id -g)"
  -v ${YOUR_CERTS_DIR}/cacerts:/tmp/cacerts \
  -v ${YOUR_REPO}:/usr/src \
  -e SONAR_HOST_URL="http://${SONARQUBE_URL}" \
  sonarsource/sonar-scanner-cli

there is an error thrown:

keytool error: java.io.FileNotFoundException: /usr/lib/jvm/default-jvm/jre/lib/security/cacerts (Permission denied)

I think it can be somehow related to this.

emzet avatar May 09 '22 22:05 emzet