I'm creating a module for Keycloak and I'm trying to register it using Modules, just how the documentation says to.
How can I register this module on keycloak-server subsystem section of standalone.xml when I'm running Keycloak with Docker?
I'm creating a module for Keycloak and I'm trying to register it using Modules, just how the documentation says to.
How can I register this module on keycloak-server subsystem section of standalone.xml when I'm running Keycloak with Docker?
If >jboss-cli.bat --file=adapter-install.cli doesn't work, then you can add --connect.
Try following command;
jboss-cli.bat --connect --file=adapter-install.cli
You can prepare module.xml manually (you could use examples from JBOSS_HOME/modules/..). Don't forget to specify all required dependencies (keycloak-core, javax ...). Now you can add module.xml and corresponding jars during Dockerfile build. Or add module.xml during image build and add jars as volumes.
Also consider running Jboss scripts in embed mode during image build. As for me there too many preliminary script job running before actual keycloak service is started. I would prefer to bake custom image using only Dockerfile (but use official keycloak docker sources as a reference).
As you are using docker to run keycloak. You can copy your custom CLIs in the docker file and run them. We mimic what keycloak did in their image and it worked for us even add modules.
https://github.com/jboss-dockerfiles/keycloak/tree/master/server/tools/cli
Our case was adding sentry module http://cloudtrust.io/doc/chapter-keycloak/sentry.html but we didn't follow it Literally.