[keycloak-user] Setting web context path and adding providers in Dockerfile

Sebastian Rus russebastian.ui at gmail.com
Tue Nov 19 02:31:46 EST 2019


I'm struggling with extending keycloak's docker image, so that I could
change the default web-context "/auth" path
in /opt/jboss/keycloak/standalone/configuration/standalone.xml
and /opt/jboss/keycloak/domain/configuration/domain.xml files. I tried to
use jboss-cli.sh to accomplish it, but the following Dockerfile:

FROM jboss/keycloak:7.0.0
COPY startup-config.cli /opt/jboss/tools/cli/startup-config.cli
RUN /opt/jboss/keycloak/bin/jboss-cli.sh
--file="/opt/jboss/tools/cli/startup-config.cli"
ENV KEYCLOAK_USER=admin
ENV KEYCLOAK_PASSWORD=admin

startup-config.cli:
/subsystem=keycloak-server:write-attribute(name=web-context,value=keycloak/auth)

build command ends with "No connection to the controller."

I also would like to add some custom providers to the <providers> section
of standalone.xml file:

       <providers>           ...
<provider>module:x.y.z.some-custom-provider</provider>
</providers>

Is it possible to edit that xml files using custom Dockerfile and
extending default keycloak image?

I will be extremally grateful for help.


Best regards,

Sebastian


More information about the keycloak-user mailing list