sonar-scanner-cli-docker
sonar-scanner-cli-docker copied to clipboard
Permission error when runing as non-root user with self-signed certificates
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.