diff --git a/onyxia-api/entrypoint.sh b/onyxia-api/entrypoint.sh index 4d0ea470..d64bfb0f 100755 --- a/onyxia-api/entrypoint.sh +++ b/onyxia-api/entrypoint.sh @@ -1,11 +1,16 @@ #!/bin/bash # Import CA certificates to Java keystore -for file in $CACERTS_DIR/* -do - echo "Adding $file to keystore" - keytool -import -cacerts -trustcacerts -noprompt -storepass changeit -alias $(basename $file) -file $file -done +if [[ -n "$CACERTS_DIR" ]]; then + for file in $CACERTS_DIR/* + do + if [ -f "$file" ] + then + echo "Adding $file to keystore" + keytool -import -cacerts -trustcacerts -noprompt -storepass changeit -alias $(basename $file) -file $file + fi + done +fi # Run application java -jar /app.jar