'KeyCloak: Deploy Custom Theme in Docker
I know how to deploy custom KeyCloak theme in Windows using both ways as stated here:
Copy-paste theme in themes directory
Using archive deploy
Can someone please suggest how to do this in docker?
Solution 1:[1]
This is what I did:
Created Dockerfile like below
FROM jboss/keycloak COPY ./themes/<yourThemeName>/ /opt/jboss/keycloak/themes/<yourThemeName>/Built new docker image from this file
docker build -t <yourDockerHubUserName>/keycloak .Run this docker image
docker container run --name <someContainerName> -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=password <yourDockerHubUserName>/keycloakCheck if new theme shows up by logging into admin console at http://localhost:8080/auth and go to realms/themes click drop down list of themes and you should see
<yourThemeName>
Solution 2:[2]
Best way is by far to bundle the theme into a .jar file and drop it here: $KEYCLOAK_HOME\standalone\deployments.
Here you have a plugin that implement this approach.
You can also use keycloakify, it bundles the theme for you.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Joseph Garrone |
