When trying to launch the Keycloak.X Docker image, I get the following error:
java.sql.SQLException: No suitable driver found for jdbc:mariadb://192.168.0.204/keycloak
Here is how I’m launching the container:
docker run -e KEYCLOAK_ADMIN=<username> -e KEYCLOAK_ADMIN_PASSWORD=<password> \
-ti -p 80:8080 quay.io/keycloak/keycloak-x \
-Dkc.db=mariadb -Dkc.db.url.host=<db-ip> \
--db-username=<db-username> --db-password=<db-password> --http-enabled=true
I’ve also tried using the --db-url parameter as well as different DB vendor strings. All of them result in the same error. What’s strange is that when running the container with the internal H2 DB, I see the following in the logs:
Installed features: [agroal, cdi, hibernate-orm, jdbc-h2, jdbc-mariadb, jdbc-mysql, jdbc-postgresql, keycloak, mutiny, narayana-jta, resteasy, resteasy-jackson, smallrye-context-propagation, smallrye-health, smallrye-metrics, vertx, vertx-web]
So, the JDBC drivers should be there according to the logs. What am I doing wrong?