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

Sebastian Rus russebastian.ui at gmail.com
Tue Nov 19 02:55:29 EST 2019


Update: when I add "--connect" flag, I receive "The controller is not
available at localhost:9990: java.net.ConnectException: WFLYPRT0053: Could
not connect to remote+http://localhost:9990. The connection failed:
WFLYPRT0053: Could not connect to remote+http://localhost:9990. The
connection failed: Connection refused" message.

wt., 19 lis 2019 o 08:31 Sebastian Rus <russebastian.ui at gmail.com>
napisał(a):

> 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