Public | Automated Build

Last pushed: 12 days ago
Short Description
Short description is empty for this repo.
Full Description

Keycloak Wildfly Adapter

This image contains Wildfly with the required bits to deploy an application that would be protected by the Keycloak subsystem, including:

  • Keycloak Wildfly Extension
  • Keycloak Wildfly Subsystem
  • Changes to the standalone.xml , to include both the extension and the subsystem, as well as the security-domain for Keycloak.


To boot in standalone mode

docker run jboss/keycloak-adapter-wildfly

Other details

This image is intended to be extended by you, to include your application to it. Without it, this image is just a Wildfly image with an extra sauce.

Note that only the standalone mode is configured. If your application needs to work on domain mode as well, changes to the domain.xml similar to the ones applies to the standalone are required.

Docker Pull Command
Source Repository

Comments (2)
2 years ago

This resolves the issue:

FROM jboss/wildfly:8.2.0.Final


WORKDIR /opt/jboss/wildfly

RUN curl -L$KEYCLOAK_VERSION/adapters/keycloak-wf8-adapter-dist-$KEYCLOAK_VERSION.tar.gz | tar zx

WORKDIR /opt/jboss

# Standalone.xml modifications.
RUN sed -i -e 's/<extensions>/&\n        <extension module="org.keycloak.keycloak-adapter-subsystem"\/>/' $JBOSS_HOME/standalone/configuration/standalone.xml && \
    sed -i -e 's/<profile>/&\n        <subsystem xmlns="urn:jboss:domain:keycloak:1.1"\/>/' $JBOSS_HOME/standalone/configuration/standalone.xml && \
    sed -i -e 's/<security-domains>/&\n                <security-domain name="keycloak">\n                    <authentication>\n                        <login-module code="org.keycloak.adapters.jboss.KeycloakLoginModule" flag="required"\/>\n                    <\/authentication>\n                <\/security-domain>/' $JBOSS_HOME/standalone/configuration/standalone.xml
2 years ago

Version 1.3.1.Final fails to start:

$ docker run jboss/keycloak-adapter-wildfly:1.3.1.Final

  JBoss Bootstrap Environment

  JBOSS_HOME: /opt/jboss/wildfly

  JAVA: /usr/lib/jvm/java/bin/java

  JAVA_OPTS:  -server -XX:+UseCompressedOops  -server -XX:+UseCompressedOops -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true


OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
13:39:54,725 INFO  [org.jboss.modules] (main) JBoss Modules version 1.4.3.Final
13:39:55,283 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
13:39:55,391 INFO  [] (MSC service thread 1-1) WFLYSRV0049: WildFly Full 9.0.0.Final (WildFly Core 1.0.0.Final) starting
13:39:56,104 ERROR [] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: WFLYCTL0085: Failed to parse configuration
    at [wildfly-controller-1.0.0.Final.jar:1.0.0.Final]
    at [wildfly-server-1.0.0.Final.jar:1.0.0.Final]
    at$ [wildfly-controller-1.0.0.Final.jar:1.0.0.Final]
    at [rt.jar:1.8.0_45]
Caused by: WFLYCTL0083: Failed to load module org.keycloak.keycloak-subsystem
    at [wildfly-controller-1.0.0.Final.jar:1.0.0.Final]
    at [wildfly-server-1.0.0.Final.jar:1.0.0.Final]
    at [wildfly-server-1.0.0.Final.jar:1.0.0.Final]
    at [wildfly-server-1.0.0.Final.jar:1.0.0.Final]
    at org.jboss.staxmapper.XMLMapperImpl.processNested( [staxmapper-1.2.0.Final.jar:1.2.0.Final]
    at org.jboss.staxmapper.XMLMapperImpl.parseDocument( [staxmapper-1.2.0.Final.jar:1.2.0.Final]
    at [wildfly-controller-1.0.0.Final.jar:1.0.0.Final]
    ... 3 more
Caused by: java.util.concurrent.ExecutionException: WFLYCTL0083: Failed to load module
    at [rt.jar:1.8.0_45]
    at java.util.concurrent.FutureTask.get( [rt.jar:1.8.0_45]
    at [wildfly-controller-1.0.0.Final.jar:1.0.0.Final]
    ... 9 more
Caused by: WFLYCTL0083: Failed to load module
    at [wildfly-controller-1.0.0.Final.jar:1.0.0.Final]
    at$000( [wildfly-controller-1.0.0.Final.jar:1.0.0.Final]
    at$ [wildfly-controller-1.0.0.Final.jar:1.0.0.Final]
    at$ [wildfly-controller-1.0.0.Final.jar:1.0.0.Final]
    at [rt.jar:1.8.0_45]
    at java.util.concurrent.ThreadPoolExecutor.runWorker( [rt.jar:1.8.0_45]
    at java.util.concurrent.ThreadPoolExecutor$ [rt.jar:1.8.0_45]
    at [rt.jar:1.8.0_45]
    at [jboss-threads-2.2.0.Final.jar:2.2.0.Final]
Caused by: org.jboss.modules.ModuleNotFoundException: org.keycloak.keycloak-subsystem:main
    at org.jboss.modules.ModuleLoader.loadModule( [jboss-modules.jar:1.4.3.Final]
    at [wildfly-controller-1.0.0.Final.jar:1.0.0.Final]
    ... 8 more

13:39:56,221 FATAL [] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
13:39:56,321 INFO  [] (Thread-2) WFLYSRV0220: Server shutdown has been requested.
13:39:56,507 INFO  [] (MSC service thread 1-1) WFLYSRV0050: WildFly Full 9.0.0.Final (WildFly Core 1.0.0.Final) stopped in 102ms