Keycloak SPI Providers and layers not loading when using Docker Keycloak SPI Providers and layers not loading when using Docker docker docker

Keycloak SPI Providers and layers not loading when using Docker


OK, I've found why this happen

it comes from the opt/jboss/tools/docker-entrypoint.sh

################## Configuration ################### If the server configuration parameter is not present, append the HA profile.if echo "$@" | egrep -v -- '-c |-c=|--server-config |--server-config='; then    SYS_PROPS+=" -c=standalone-ha.xml"fi

it will launch the keycloak as a clustered, as I think they considered the standalone as not safe for production

Standalone operating mode is only useful when you want to run one, and only one Keycloak server instance. It is not usable for clustered deployments and all caches are non-distributed and local-only. It is not recommended that you use standalone mode in production as you will have a single point of failure. If your standalone mode server goes down, users will not be able to log in. This mode is really only useful to test drive and play with the features of Keycloak Blockquote

To keep the 'standalone mode', override the image to add the property -c standalone.xml as parameters:

CMD ["-b", "0.0.0.0", "-c", "standalone.xml"]


https://hub.docker.com/r/jboss/keycloak/:

To add a custom provider extend the Keycloak image and add the provider to the /opt/jboss/keycloak/standalone/deployments/ directory.

Did you use volume at /opt/jboss/keycloak/standalone/deployments/ for your custom providers?