Change Login Theme in Keycloak Docker Image

I was asked a question around how to change the theme in the Keycloak docker image and I had never tried it. So it was worth a blog. First pull the original image

docker pull jboss/keycloak

Then start the image

Login to the container with the CONTAINER ID

docker exec -it 47dd5c82b073 bin/bash

Create a directory for your theme in the container

mkdir /opt/jboss/keycloak/themes/raincatcher-theme

I blogged about creating a custom theme here so I have a git repo with a theme so I cloned it to my local machine

git clone

Copied the contents of the theme directory from my local machine to the new directory on the running container

docker cp raincatcher-keycloak-theme/. 47dd5c82b073:/opt/jboss/keycloak/themes/raincatcher-theme

Restart the container

docker restart 47dd5c82b073

You should be able to select the image from the drop down once the container restarts

Exit the docker exec

So that it , you will need to build a new image from the container and tag and push the image to save your changes.

Full Stack Software Engineer at Red Hat