Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

KeyCloak: Deploy Custom Theme in Docker

I know how to deploy custom KeyCloak theme in Windows using both ways as stated here:

  1. Copy-paste theme in themes directory

  2. Using archive deploy

Can someone please suggest how to do this in docker?

like image 812
CodeZila Avatar asked Feb 17 '26 21:02

CodeZila


1 Answers

This is what I did:

  1. Created Dockerfile like below

    FROM jboss/keycloak
    
    COPY ./themes/<yourThemeName>/ /opt/jboss/keycloak/themes/<yourThemeName>/
    
  2. Built new docker image from this file

    docker build -t <yourDockerHubUserName>/keycloak .

  3. Run this docker image

    docker container run --name <someContainerName> -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=password <yourDockerHubUserName>/keycloak

  4. Check 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>

like image 77
meDev Avatar answered Feb 19 '26 23:02

meDev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!