How to register keycloak module in standalone.xml (keycloak on docker)

Viewed 3022

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?

4 Answers

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).

Related